y = x² - 10x + 8
Multiply coefficient of x, which is -10, by
, getting -5.
Square -5, getting (-5)² = +25.
Add 25 - 25 (which is really zero) to the right side after the -10x
y = x² - 10x + 25 - 25 + 8
Factor the first three terms on the right sides:
y = (x - 5)(x - 5) - 25 + 8
Write (x - 5)(x - 5) as (x - 5)², and write -25 + 8 as -17
y = (x - 5)² - 17
That's it.
Edwin