Check the final answer first, then review the worked steps.
y = x^2 + 10x + 8y = (x^2 + 10x + 25) - 25 + 8y = (x + 5)^2 - 17