The two in the term is what throws everything off. Look at the equation with the two divided through it:
Now we need two numbers that add up to and multiply to be 2. Since the second term has a half in it, that's probably going to be part of it, we can try
Now, what number can we pick? We can solve:
If you work it out you get that:
Is your answer, which is exactly what you and your teacher got, and even though it took a little bit of extra work, just understand that if there is a number infront of the term then at least ONE x will have to be multiplied by something. Dividing through helps sometimes, but doing it the way your teacher did will be important for larger numbers.