\(A=\left(1-x\right)\left(2+x\right)\le\dfrac{1}{4}\left(1-x+2+x\right)^2=\dfrac{9}{4}\)
\(A_{max}=\dfrac{9}{4}\) khi \(1-x=2+x\Leftrightarrow x=-\dfrac{1}{2}\)
\(B=\left(3-x\right)\left(2+x\right)^2=\dfrac{1}{2}\left(6-2x\right)\left(2+x\right)\left(2+x\right)\le\dfrac{1}{2}\left(\dfrac{6-2x+2+x+2+x}{3}\right)^3=\dfrac{500}{27}\)
\(B_{max}=\dfrac{500}{27}\) khi \(6-2x=2+x\Rightarrow x=\dfrac{4}{3}\)