Here is part of a working given by an answer of a particular question:
40*(a–b)=50*(x–y)
If a, b, x, and y are whole numbers, (a – b) must in fact be a multiple of 5.
Why must $\displaystyle (a-b)$ a multiple of five?
Divide through by 10: 4(a - b) = 5(x - y)
You know that a, b, x, and y are whole numbers, so, even if the differences give you negatives, a - b and x - y have to be integers (whole numbers or their negatives).
Dividing through by 5, you get x - y = (4/5)(a - b).
Since x - y is a whole number (or the negative of a whole number), then (4/5)(a - b) must also be such. You know that 4/5 isn't a whole number. Then there must be something in a - b that "cancels off" with the "5" in the denominator of 4/5, so that (4/5)(a - b) ends up having no denominator.
The only thing that could cancel off is a factor of 5, so a - b must be factorable, and one of its factors must be 5.