It looks like you were completing the square, but incorrectly.
Step 1 is divide by the coefficient of x^2. It's 1, so that doesn't change the equation.
Step 2 is move the constant to the other side. You did that correctly.
x^2 -2x = 3
Step 3 is take 1/2 the coefficient of x, square it and add that to both sides. The coefficient of x is -2, 1/2 that is -1, squared it's 1.
x^2 -2x + 1 = 4
Step 4 is factor the left side. It will always be x then the sign of the original coefficient of z which in this case is -, then the number you added to both sides in step 3 (in this example it's 1). That whole thing is squared.
(x-1)^2 = 4 Take the square root of both sides
x-1 = + or - sqrt(4) = + or - 2.
Add 1 to both sides.
x = 1 + or - 2 = 3 or -1.