A very good way to remember how to factor for something like this is using the technique:
__________ x^2
ADDS TO 7
MULITPLIES TO 12
So, clearly, we can see that 4 & 3 add to 7 and multiply to 12. When you take into account the negative sign in front of the 7, we get:
x^2 - 7x + 12 = (x-4)(x-3)
-4 + -3 = -7
-4 * -3 = +12