Ta có:
\(A=\left(x^2-4\right)\left(x+3\right)-\left(x+1\right)^3\)
\(=x^3+3x^2-4x-12-\left(x^3+3x^2+3x+1\right)\)
\(=-4x-12-3x-1=-7x-13\)
Áp dụng hằng đẳng thức,ta có:
\(B=\left(x+2-x+2\right)\left[\left(x+2\right)^2+\left(x+2\right)\left(x-2\right)+\left(x-2\right)^2\right]-12x^2\)
\(=4\left(x^2+4x+4+x^2-4+x^2-4x+4\right)-12x^2\)
\(=4\left(3x^2+4\right)-12x^2=16\)
Vậy..