Question: Consider integer x, such that $100 \le x \le 999$

Reshuffle the digits of x and call it y.

Find $\vert x-y\vert$, call each digit of this new 3 digit integer; a, b, and c.

Then any 1 of three digits can be found if we are told 2 of them by $a+b+c \equiv0(\mod 9)$

For example: $x = 314$, reshuffle; $y = 134$.

$\vert314-134\vert = 180$

$a=1, b=8, c=0$

Given $b$ and $c$

Then, $a+(8+0)=0(\mod9)$

$a+8=0(\mod9)$

$a+8=0+9q$, for some integer q

$a=1$

What is the formal proof for why this works?

Answer: 
Let $x= x\_1\*100+x\_2\*10+x\_3$ and $y $ has the same digits but as the coefficients of different powers of $10$. So $y=x\_1\*10^i+x\_2\*10^j+x\_3\*10^k $ where $\{i,j,k\}=\{0,1,2\} $.

So $x-y= x\_1\*(100-10^i)+x\_2\*(10-10^j)+x\_3\*(1-10^k) $.

It's well-known and easy to prove that $9$ divides $10^m-10^n $ for all integers $m,n $, so $9$ divides $x-y $.

And it's well known and easy to research how to prove that the sum of the digits of a multiple of $9$ is a multiple of $9$.

And therefore $a+b+c\equiv 0 \mod 9$.

We need to also prove that $x-y $ is at most three digits, but that's obvious: $100\le x,y\le 999$ so $-899 \le x-y \le 899$.

So if we know $a,b $ then $c=-a-b\mod 9$ has a unique solution.
It comes from the [divisibility test for $9$](https://en.wikipedia.org/wiki/Divisibility_rule#Divisibility_by_3_or_9). To find the remainder on division by $9$ add the digits. If the sum is $10$ or greater add the digits again. Keep going until you get to a single digit. That will be the remainider, except that if the digit is $9$ the remainder is $0$. Rearranging the digits of a number does not change the digit sum, so does not change the remainder on division by $9$. Subtracting two numbers with the same digit sum will then give a number divisible by $9$, so when you sum the digits enough times you will get $9$.