x=y

x^2=y^2

xy=y^2

xy-x^2=y^2-x^2

-x(x-y)=(x+y)(x-y)

-x=x+y

2x=y

2x=x

2=1

1=0

No me

Lets go through that with numbers

x = 2 y = 2

2 = 2

2^2 = 2^2

2 x 2 = 2^2

2 x 2 - 2^2 = 2^2 - 2^2

-2 x (2 - 2) = (2 + 2) x (2 - 2)

-2 = (2 + 2)

-2 = 4

Really, all you need is;

-2 x (2 - 2) = (2 + 2) x (2 - 2)

because you can cancel the (2 - 2) from each side,

-2 = (2 + 2)

Meaning -2 = 4, -3 = 6, -4 = 8

O_o Math class is meaningless.