From Introduction to Real Analysis, 4th Edition. Page 107, example (e).
Can someone explain the algebraic operations that were performed to get |x-2| factored out in the manner illustrated in the example? It's not making sense to me. For example, if I go in reverse and distribute |x-2| back in, I end up with a 5x^4 term.
I've included an excerpt of the example with includes the manipulation I'm unsure of. Thank you.

There is a typo, $5x^3+6x+12$ should be $5x^2+6x+12$.
Note that
$$5x^3-4x^2-24=(5x^2+6x+12)(x-2)$$