So, someone was showing me a math problem where he said he could get 1 = 2. Here's what he did:

Thus

So

Right?

Then, he factored:

Divided by (x - 1):

to cancel out (x - 1)

Resulted in:

From where he plugged in x = 1:

Therefore:

Please explain to me why this fails, because it seems like it does in so many places, but I want to know why exactly! For instance, dividing by would be the same as dividing by zero, which would fail, but he thinks he's pretty much found where math has a weakness. I need expert verification!