\(x(x-1)(x+1)-(x-3)(x^2+2x+9)\)
\(=x\left(x^2-1\right)-\left[x\left(x^2+2x+9\right)-3\left(x^2+2x+9\right)\right]\)
\(=x^3-x-\left(x^3+2x^2+9x-3x^2-6x-27\right)\)
\(=x^3-x-\left(x^3-x^2+3x-27\right)\)
\(=x^3-x-x^3+x^2-3x+27\)
\(=x^2-4x+27\)
#\(Toru\)