Separate the 1st 2 terms from the 3rd term:
y = x^2 - 8x + 7
Next, take half of the coefficient of x (that is, half of -8).
In this case that'd come out to -4.
Square this -4 and add the result (16) to x^2 - 8x: x^2 - 8x + 16; subtract -16 from 7:
x^2 - 8x + 16 7 - 16
Write the trinomial as
a perfect square:
(x-4)^2 -9
The answer is (x-4)^2 - 9.
This approach is very useful. Note that the vertex of the parabola represented by the given polynomiql is (4,-9).