原式=X^3+2X^2+X-X-5X-6
=(X^3+2X^2+X)+(-X-5X-6)
=X(X^2+2X+1)+(-6X-6)
=X(X+1)^2-6(X+1)
=(X+1)(X^2+X-6)
=(X+1)(X-2)(X+3)