\(B=\left(x^2+2x\right)-2x^2-4x-3\)
\(=\left(x^2+2x\right)^2-2\left(x^2+2x\right)-3\) \(\left(1\right)\)
Đặt \(x^2+2x=t\) , khi đó \(\left(1\right)\Leftrightarrow t^2-2t-3=\left(t+1\right)\left(t-3\right)=\left(x^2+2x+1\right)\left(x^2+2x-3\right)=\left(x+1\right)^2\left(x-1\right)\left(x+3\right)\)