Hi Ed,
The idea is that for any integer n, the sum of the digits of n and the number n itself leave the same remainder when divided by 9.
For example 7843 and 7 + 8 + 4 + 3 = 22 leave the same remainder when divied by 9. First note that
7843
= 7 x 1000 + 8 x 100 + 4 x 10 + 3
= 7 x (999 + 1) + 8 x (99 + 1) + 4 x (9 + 1) + 3
= (7 x 999 + 8 x 99 + 4 x 9) + (7 + 8 + 4 + 3).
If we divide this number, 7843, by 9 we can do it it two steps:
divide (7 x 999 + 8 x 99 + 4 x 9) by 9;
and then divide (7 + 8 + 4 + 3) by 9.
Clearly the first part leaves a remainder of 0 when divided by 9; thus 7843 and (7 + 8 + 4 + 3) leave the same remainder after division by 9.
In the situation that you have, when you take an integer like 125 and subtract from it the sum of its digits, you are subtracting two integers that have the same remainder when divided by 9 and thus the answer will be an integer that is a multiple of 9. Briefly if n = 9p + r and m = 9s + r then n  m = 9 (p  s), i.e. a multiple of 9.
Note that this gives us an easy way to check if an integer is divisible by 9 or not. Since the integer and its sum of digits both leave the same remainder when divided by 9:
An integer is divisible by 9, if and only if the sum of its digits is.
This works for divisibility by 3 also. Can you see why?
Cheers,
Denis
