#x^2-6x+9=color(white)a8#
#color(white)(aaaa^2aa)-9color(white)a-9color(white)(aaa)#Subtract 9 from both sides
#x^2-color(red)(6)xcolor(white)(aaa)=-1#
Divide the coefficient of the #x# term #color(red)(6)# by 2 and square the result.
#color(red)6/2=color(limegreen)3 => color(limegreen)3^2=color(blue)9#
Add #color(blue)9# to both sides.
#x^2-6x+color(blue)9=-1+color(blue)9#
#x^2-6x+9=8#
Note that you got the exact equation you started with! The next step is to factor the left side into the square of a binomial. The left side of this equation started out in factorable form, but I demonstrated all the steps anyway for future reference.
Factor the left side
#(x-3)(x-3)=8color(white)(aaa)#
#Rewrite as the square of a binomial.
#(x-color(limegreen)3)^2=8color(white)(aaa)#Note that #color(limegreen)3# is the number you got when you divided the coefficient of the x term by 2.
Square root both side.
#sqrt((x-3)^2) =sqrt8#
#x-3=sqrt(4*2)#
#x-3= +-2sqrt2#
#color(white)a+3color(white)(aaaaaaaa)+3#
#x=3+-2sqrt2#