Whatever number you think, if you do as instructed, you will get either 9, 18, 27, 36, 45 etc.
The result is always a multiple of 9.
The selection square has the same item in all the multiples of 9. (same item is in 9, 18, 27 etc.)
So the trick is not that hard.