Jabir bin Yazid Amiri narrates from his father: I participated in the Hajj with the Prophet Muhammad (peace be upon him). I performed the morning prayer in Masjid Khaif in Mina, following him. When the Prophet (peace be upon him) completed the prayer, there were two people behind the congregation who had not performed the prayer. They were brought forward and were trembling. The Prophet (peace be upon him) asked: Why did you not pray with us? They replied: We had already performed the prayer at our residence. The Prophet (peace be upon him) said: Do not do this. When you have performed the prayer at your residence and then come to a mosque where the congregational prayer is being held, then perform the prayer with those people as well; it will be counted as a voluntary prayer for you.
Hadith Referenceصحیح ابن حبان / كتاب الصلاة / 2395
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «صحيح أبي داود» (590 - 591).فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح، وقد تقدم برقم (1565).