How do you find the distinct equivalence classes of R?

A = {-4, -3, -2, -1, 0, 1, 2, 3, 4, 5}. R is defined on A as follows:

For all x, y elements of A, x R y <=> 3|(x-y).

I have the answer, but I do not understand the work leading up to the answer. I appreciate any help.

I am having the same issue with this one:

A = {-4, -3, -2, -1, 0, 1, 2, 3, 4}. R is defined on A as follows:

For all (m,n) elements of A, m R n <=> 5|(m^2 - n^2).