Answer:
Yes
Step-by-step explanation:
Lets do math:
(x-1)(x+2) is what we need to solve
x^2+2x-x-2 is what we get if we expand the equation
simplified version of that would be
x^2+x-2
which is equivalent to what was written in the beginning.
So yes the equation is correct