1. X = Y let x=y
2. X*X = XY multiply by x on both sides
3. X*X - Y*Y = XY - Y*Y subtract y*y from both sides
4. (X+Y)(X-Y) = Y(X-Y) factorise
5. (X+Y) = Y divide by (x-y) on both sides
6. Y+Y = Y replace x with y
7. 2Y = Y factorise
8. 2 = 1 divide by y on both sides
Where lies the flaw in the logic?
Answer: On line 4 we are dividing both sides by (X-Y), now, since X=Y, this is 0. We are not allowed to divide by zero. This leads to a meaningless conclusion.