\(B=x^4-4x^3-2x^2+12x+9\)
\(=\left(x^4-2x^3-3x^2\right)-\left(2x^3-4x^2-6x\right)-\left(3x^2-6x-9\right)\)
\(=x^2\left(x^2-2x-3\right)-2x\left(x^2-2x-3\right)-3\left(x^2-2x-3\right)\)
\(=\left(x^2-2x-3\right)^2=\left(x^2+x-3x-3\right)^2=\left(x+1\right)^2\left(x-3\right)^2\)
Hok tốt !