In this kind of factoring,a good way is the following;
As a result of the remainder theorem,if x=b makes any polynomial vanish,then (x-b) is a factor of it.
Now,how could you find any number such b?
According to the rational root theorem,a possible integer root of such a polynomial should be a divisor of the constant term(here is -8) which are ;
1,2,4,8,and their negatives.
So,we should substitute them,one by one,starting from x=1 to see which ones make it vanish.
Here,x=1,2,and 4 make it vanish,then (x-1)(x-2)(x-4) is a factor of it.
Now,since the degree of the polynomial is 3,and the coefficient of x^3 is 1,then,
Those are all the factors.Substituting can be annoying.I mean,how would you evaluate the polynomial for x=4?!
Let’s calculate it by a fast substituting method;
x^3=x^2.x
Now plugging 4 into x,
x^3=x^2.x=x^2.4=4x^2
So,f(x)=x^3-7x^2+14x-8=4x^2-7x^2+14x-8=-3x^2+14x-8
Again,writing -x^2=-x.x,and setting x=4,
-3x^2=-3x.x=-3x.4=-12x
So,f(x)=-3x^2+14x-8=-12x+14x-8=2x-8
Setting x=4,f(x)=2(4)-8=8-8=0
Here,i had to explain it step by step.So,if you do it by yourself,you'll find it's fast.