a: \(=3x\left(x^2-2x+1\right)-2x\left(x^2-9\right)+4x\left(x-4\right)\)
\(=3x^3-6x^2+3x-2x^3+18x+4x^2-16x\)
\(=x^3-2x^2+5x\)
b: Sửa đề: \(\left(x^3+6x^2+12x+8\right)+3\left(x^2+4x+4\right)+3\left(x+2\right)\)
\(=x^3+6x^2+12x+8+3x^2+12x+12+3x+6\)
\(=x^3+9x^2+27x+26\)