«إذا أتيتم الصلاة فعليكم بالسكينة ولا تأتوها وأنتم تسعون فما أدركتم فصلوا وما فاتكم فأتموا»
(صحيح) [حم ق] عن أبي قتادة)
It is reported that the Prophet (peace and blessings of Allaah be upon him) said:
“Whenever you come for the prayer, you should come with calmness, and pray whatever you get (with the people) and complete the rest which you have missed. ”
This hadith was narrated by Ahmad 5/306, al-Bukhari 635 and Muslim 603 from the words of Abu Qatada.
Sheikh al-Albani called the hadith authentic. See Saheeh al-jami ‘as-saghir 275.
 That is, perform the rak’ats you missed immediately after completing that which you caught up from the common prayer.