There are a couple of formulas that we should know about quadratic functions, and this one utilizes this one:
(x - a)^2 = x^2 -2ax + a^2
Notice how x^2 - 8x + 16 fits into the formula:
x^2 - 8x + 16
x^2 - 2*x*4 + 4^2
(x - 4)^2
(x - 4)(x - 4)
Of course, not all expanded quadratic expressions fit into that formula, so there is a universal method to factor quadratic expressions:
x^2 + x(a + b) + ab —> (x + a)(x + b)
Basically, the middle term is the sum of an and b times x, and the last term is the product of an and b. So, if we are using the expression given in the problem, notice how -4 * -4 is 16, and the sum of -4 and -4 is -8. Thus, a and b are both -4 and the factored form is (x - 4)(x - 4)