x^3+5x^2-18 Using the method of adding and removing items

x^3+5x^2-18 Using the method of adding and removing items

x^3+5x^2-18
=x^3+3x²+2x²-18
=x²(x+3)+2(x²-9)
=x²(x+3)+2(x-3)(x+3)
=[x²+2(x-3)](x+3)
=(x²+2x-6)(x+3)