I confirmed it's accurate by replacing x with 5 in both the original equation and the factored equation to get the same answer.
You can also multiply the factors out again to get back to the original equation.
I figured (x-4) might divide into the original equation because -4 * x^2 = -4x^2 which would subtract nicely from -4x^2 in the original equation, and becausse -4 * -5 = 20 which would subtract nicely from 20 at the end of the equation.
Not totally scientific but it worked.
x goes into x^3 by a factor of x^2
(x-4) * x^2 = x^3 - 4x^2 which subtracts from x^3 - 4x^2 without a remainder.
The division is left with (x-4) into (-5x + 20) which comes out very clean with a factor of -5.
-5 * (x-4) = -5x + 20 which subtracts very nicely from -5x + 20 to leave a remainder of 0.
My answer by dividing the original equation by (x-4) became (x-4) * (x^2 - 5) which led to the final solution.