To solve by completing the square, you have to write the equation in the form x^2+2ax+a^2=(x+a)^2
Using 2ax=-8x, we can solve for a, which is 2ax/2x. We can then use this to find that a=-4.
Plug a=-4 into the equation x^2+2ax+a^2=(x+a)^2.
x^2-8x+(-4)^2=9+(-4)^2
x^2-8x+(-4)^2=25
Complete the square:
(x-4)^2=25
Solve x-4=sqrt25 (square root) and x-4=negsqrt25 (negative square root)
x=9 and x=-1.
These can be proven by plugging them into the above equation (x-4)^2=25.
9-4^2=25 and -1-4^2=25.
Hope this helps ;)