How the heck does this work?

Go here, and follow the directions.  (Just FYI, because it was ambiguous, when she says “remember your number,” she means remember the number that results after you’ve done the subtraction.)  I did it five times and she got the right answer five times.

Then, if you can, please explain to me how the heck this works.

Hat tip:  Sadie