There's a Catch Somewhere: Solution

At first I thought my friend had pulled a fast one by scratching out the y's in the last step. But on second thought I realised it was correct. He did remind me that x is not equal to zero; since x = y, y is also non-zero. So, dividing both sides by y was perfectly okay; nothing wrong with that.

All those additions and subtractions were also okay because they were being carried out on both the sides.

So, everything was alright till the step: (x + y) * (x - y) = y * (x - y).

Then, he went and divided both sides by (x - y). That was all wrong. He shouldn't have done that; we know that x = y which means (x - y) = 0. So, he actually went and divided by 0! Division by 0 is undefined.

He had no business dividing both sides by (x - y) because (x - y) = 0. That was the error. Am I right?

The equation (x + y) * (x - y) = y * (x - y) is of the form A * C = B * C with A = (x + y), B = (x - y) and C = y. Now if A * B = B * C, then in order for the equality to hold, either A = C or B = 0. Now (x + y) is certainly not equal to "y" because if (x + y) is equal to y, then x has to be zero; but x is not equal to zero. Therefore, (x - y) = 0 has to be true; in this case, since both sides are multiplied by zero we have 0 = 0 which is true. So, (x - y) has to be zero. It is indeed true because we started with the statement x = y which means (x - y) = 0.