How did Naruto land the finishing Rasengan on Pain?
What happened is as follows:


Naruto throws first shuriken, Shinra Tensei deflects it.
Naruto throws second shuriken, Pain dodged.
Naruto's Multiple Shadow Clone Technique attempts to attack Pain with all the clones, Shinra Tensei deflects them all.
Naruto, taking advantage of the 5 seconds it takes him to recharge, flings himself with the aid of 2 clones, and lands the Rasengan straight at him before he can use Shinra Tensei again.


Still not clear? Tell me in the comments :)