This is completing the square.
So x^2-6x-12=0
Add 12 to both sides so x^2-6x=12
Now take half the x term and square it. Add this number to both sides.
So x^2-6x+9=12+9
Which is the same as (x-3)^2=21
This is answer 2.