Since the coefficient of x2 is 1, the number that gets added to both sides is found by taking ½ of the coefficient of x and then squaring the result of that operation.
So, in this particular example, we take half of 6, which is 3, and then square 3 to get 9. We then add 9 to both sides to obtain:
x2 - 6x + 9 = 7 + 9 The reason for doing this is that the left side is now a perfect square trinomial. Hence the name "completing the square".
Thus, (x-3)2 = 16
x - 3 = ±√16
x - 3 = ±4
x = 3 + 4 or 3 - 4
x = 7 or -1
NOTE: in the given problem, the coefficient of x2 is 1. If the coefficient of x2 isn't 1, we would first divide both sides of the equation by the coefficient of x2 and then proceed as above.
For example: Solve 3x2 + 12x = -10 by completing the square
Solution: Divide both sides by 3 to get x2 + 4x = -10/3
Add (½(4))2 = 4 to both sides to obtain x2+4x+4 = 2/3
Factoring the left side of the equation gives (x+2)2 = 2/3
Taking the square root of both sides yields x+2 = ±√(2/3)
So, x = -2 ±√(2/3)