The previous answer was incorrect, as x=-2 is not a solution to the equation. I'm sure this was just a typo but I thought I'd try to explain an alternative method to completing the square, which is essentially what the previous answer detailed.
First, you would rearrange to standard form
x^2 - 10x + 16 = 0
Then just factorise it by finding two numbers a and b such that ab = 16 and (a+b) = -10. Then it will factorise to (x - a)(x - b) = 0. In this case, they are -2 and -8.
=> (x - 2)(x - 8) = 0
You can expand this just to check if you like:
=> x^2 + (-2x) + (-8x) + (-8 * -2) = 0
=> x^2 - 10x + 16 = 0
This is the original equation so we know that we factorised successfully.
The only solutions to the factorised form occur when one of the brackets equals 0, or in other words, when x = 2 or x = 8.