a, `(x-3)(x^2+3x+9)-(x^2-1)(9x+27)`
`=x^3-3^3-(9x^3+27x^2-9x-27)`
`=x^3-3^3-9x^3-27x^2+9x+27`
`=-8x^3-27x^2+9x`
b, `(x-2)(x^2+2x+4)-x(x-3)(x+3)`
`=x^3-2^3-x(x^2-9)`
`=x^3-8-x^3+9x`
`=9x-8`
a) Ta có: \(\left(x-3\right)\left(x^2+3x+9\right)-\left(x^2-1\right)\left(9x+27\right)\)
\(=x^3-27-\left(9x^3+27x^2-9x-27\right)\)
\(=x^3-27-9x^3-27x^2+9x+27\)
\(=-8x^3-27x^2+9x\)
b) Ta có: \(\left(x-2\right)\left(x^2+2x+4\right)-x\left(x-3\right)\left(x+3\right)\)
\(=x^3-8-x\left(x^2-9\right)\)
\(=x^3-8-x^3+9x\)
\(=9x-8\)