x^2 - 8x = (x^2 - 8x + 16 )- 16 = (x-4)^2 - 16
You should know that . Comparing that to you can see that "2ax" must be "8x" so that 2a= 8, a= 4. And then . To make into the "perfect square" we need to add 16- and, of course, in order not to change the value we must also subtract 16: .