The Master is crafty like the Doctor. Simply amazing the Master had a way to get AU Nine. In their dimension events where different, the Master had created the filter perceptive to use for his benefit.
He appeared right behind Ten and grabbed him and hit his little jumper to jump out of Torchwood. The Master had waited for this moment. The one thing he wasn’t capable to plant a bomb in Torchwood but capturing A Doctor was well enough.