Let f(x) = x4 + x3 - 7x2 - x + 6
By trial, f(1) = 0 and f(2) = 0
So by factor theorem, (x - 1) and (x - 2) are factors of f(x).
(x - 1) (x - 2) = x2 - 3x + 2
Now, f(x) = x2 (x2 - 3x + 2)+ 4x (x2 - 3x + 2) + 3 (x2 - 3x + 2)
= (x2 - 3x + 2) (x2 + 4x + 3)
= (x - 1) (x - 2) (x + 1) (x + 3)