Ethan S. answered 05/08/20
"Completing the square" has a very nice geometric intuition behind it, but when we're dealing with negative coefficients like -12, it can help to back that with algebra. In the same way a whole number is a "perfect square" if it's the square of another whole number, a quadratic is a "perfect square" if it's the square of a binomial (something of the form x + y). To see the general form for this, we can square a binomial ourselves:
(x+y)2 = (x+y)(x+y) = x2 + 2xy + y2.
If we can manipulate an expression to resemble the one on the right, we can work in reverse and rewrite the quadratic as a perfect square. Let's see how our expression matches up:
x2 - 12x + ___
x2 + 2xy + y2
Let's focus in on that middle term. We want to find some y so that -12x = 2xy. If we divide both sides of the equation by 2x, we find that y = -6, and to "complete the square", we can simply add y2 = (-6)2 = 36 to the end of our expression, giving us
x2 - 12x + 36
This is now a perfect square of the form (x + y)2, with y = -6, so we can rewrite it as
x2 - 12x + 36 = (x + (-6))2 = (x - 6)2