Looks to me like a variation on "casting out 9s". That is, take a number and add its digits. If the sum is larger than 9, do the same to the sums.
For those who don't want to go to that website: You pick a 3 or 4 digit number (you are encouraged to chose one with several different digits). Say 3214, for example. Write another number made from those same digits rearranged: 4132, say. Now subtract the smaller of those two numbers from the larger: 4132- 3214= 918.
You are now instructed to choose a NON-ZERO digit from that number, say 1, and type in the remaining digits, 98. The site then tells you the digit you picked, in this case 1.
If you "cast out 9s" with the number 3214 you get 3+2+1+4= 10. Since that is larger than 9, do it again: 1+ 0= 1. If you do the same thing with the rearranged number, 4132, since you have exactly the same digits to add, you get the same thing: 1. Now the crucial point is that the result of casting out 9s is "preserved" by the usual arithmetic operations: adding, subtracting (as long as the subtraction leaves a positive integer), multiplying, dividing (as long as the division leaves a positive integer). To prove that you need to write the number as a sum of powers of 10 as NWScience suggested.
Since you are instructed to "subtract the smaller number from the larger" you will always get a positive integer and since the original number and it rearranged form have the same "casting out 9s" number, the number you get when you subtract MUST give 9 (same as 0 since this is essentialy "modulo 9") after casting out 9s! In this case, the number we got by subtracting was 918:9+ 1+ 8= 18= 9. Knowing all except 1 digit of this number, since we know their "casting out 9s", we can find that last digit. Here, if we picked 1 and told the site that 98 remained, it is easy to calculate that 9+ 8= 17, 1+ 7= 8 so the remaining digit must be 9- 8= 1. If we had instead picked the digit 9 we would have told the site that we were left with 18: 1+ 8= 9. This is the "ambiguous case" since in "casting out 9s" 0 and 9 are equivalent: that;s why we were specifically instructed to choose a NON-ZERO digit!