Quadratic equation cancellation error. $$(x-1)^2 + 2x - 2  = (x+1)(x+2)$$
$$(x-1)^2 + 2(x-1) = (x+1) (x+2)$$
$$(x-1) (x-1+2) = (x+1) (x+2)$$
$$(x-1)\require{cancel}\cancel{(x+1)} = \require{cancel}\cancel{(x+1)}(x+2)$$
$$(x-1) = (x+2)$$
$$x-x = 2+1$$
$$0 = 3$$
But when i do it like this
$$(x-1)^2 + 2x - 2  = (x+1) (x+2)$$
$$x^2 - 2x + 1 + 2x -2 = x^2 + 2x + x +2$$
$$x^2 - 1 = x^2 + 3x +2$$
$$-1 -2 = 3x$$
$$-3 = 3x$$
$$-1 = x$$
So in the first solution is my simplifying is wrong?

In the first set of equations, where you reached a contradiction, you divided both sides of the equation by $x+1$, but you can't divide by zero.
So you should have said at that point, either $x=-1$ or I can divide ... and since dividing gives a contradiction, I must have $x=-1$.
Then the two methods become consistent.
