a³-4a²+2a-8
Factor the first two terms a³-4a² by taking out the
greatest common factor, a², getting a²(a-4).
Factor the last two terms +2a-8 by taking out the
greatest common factor, getting +2(a-4)
So we have
a²(a-4)+2(a-4)
Notice that there is a common factor, (a-4)
a²(a-4)+2(a-4)
which we can factor out leaving the a² and the +2 to put
in parentheses:
(a-4)(a²+2)
Edwin