(X^3+X^2-7)/(x-3)
=(X^3-3x²+3x²+X^2-7)/(x-3)
=x²+(4x²-12x+12x-7)/(x-3)
=x²+4x+(12x-36+29)/(x-3)
=x²+4x+12+29/(x-3)