`3x(x^2+3x-5)-(x^2+1)(3x+3)+(x+2)^2`
`=3x^3 + 9x^2 -15x -(3x^3 +3x^2 +3x+3)+x^2 +4x+4`
`=3x^3 + 9x^2 -15x -3x^3 -3x^2 -3x-3+x^2 +4x+4`
`=7x^2 -14x+1`
\(=3x^3+9x^2-15x-\left(3x^3+3x^2+3x+3\right)+x^2+4x+4\)
\(=3x^3+9x^2-15x-3x^3-3x^2-3x-3+x^2+4x+4\)
\(=\left(3x^3-3x^3\right)+\left(9x^2-3x^2+x^2\right)+\left(-15x-3x+4x\right)+4\)
\(=7x^2-14x+4\)