This won't be the easiest way to do this problem but as your teacher requires it I will do it that way. But at the end I will show another way to do it with the quadratic formula.
First complete the square
x^2-3x+1=0
(x^2-3x+9/4)+1=9/4
(x-3/2)^2=9/4-1
(x-3/2)^2=5/4
x-3/2=±
x= 3/2±
Done!
*Now this next way is not the way your teacher wants you to do it but I personally think its easier.
Just use the quadratic formula x=[-b±sqrt(b^2-4ac)]/2
x=[3±sqrt(9-4*1*1)]/2
x=(3±sqrt5)/2
x=3/2±sqrt5/2
We get the same answer but I think this way is easier. Now if your teacher ask for the top way just do the top way don't do the bottom because you will lose points, its just a shorter way to do things. Now I hope this helped and any additional questions about this just ask me in the comments.