Given
color(white)("XXX")x^2-8x+7=0color(white)("XX")Note: I modified the question to include the color(blue)(=0)
Then
color(white)("XXX")x^2-8x=-7
Remembering the general relation:
color(white)("XXX")x^2+2ax+a^2 = (x+a)^2
If x^2-8x are to be the first two terms of x^2+2ax+a^2
then
color(white)("XXX")a=-4
and
color(white)("XXX")a^2=16
So we will need to add 16 (to both sides) to underline("complete the square")
color(white)("XXX")x^2-8x+16 = -7+16
color(white)("XXX")(x-4)^2=9
color(white)("XXX")x-4=+-3
color(white)("XXX")x=4+-3
color(white)("XXX")x=7color(white)("XX")orcolor(white)("XX")x=1