IF YOU WANT TO POST BIG ALGORITHMS, LEAVE.

Anywho. So, this is pretty basic, but I have a question.

y-x=x-y

This isn't always true, but my teacher taught us that, if you want to get a number to the other side, for positives, you subtract that number from both sides (y/-y). For negatives, add. So, according to him, this should be possible, but if you substitute in, say x=5 y=6,

6-5=5-6

Unfortunately, 6-5=1 and 5-6=(-1).

Can anyone explain this to me?