كتاب صلاة الجماعة
8  
Prayer in Congregation

Yahya related to me from Malik from Nafi that Abdullah ibn Umar used to say, "Someone who prays maghrib or subh and then catches them with the imam should not repeat them."

Malik said, "I do not see any harm in someone who has already prayed in his house praying with the imam, except for maghrib, because if he repeats it, he makes it even."

وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ نَافِعٍ، أَنَّ عَبْدَ اللَّهِ بْنَ عُمَرَ، كَانَ يَقُولُ مَنْ صَلَّى الْمَغْرِبَ أَوِ الصُّبْحَ ثُمَّ أَدْرَكَهُمَا مَعَ الإِمَامِ فَلاَ يَعُدْ لَهُمَا ‏.‏ قَالَ مَالِكٌ وَلاَ أَرَى بَأْسًا أَنْ يُصَلِّيَ مَعَ الإِمَامِ مَنْ كَانَ قَدْ صَلَّى فِي بَيْتِهِ إِلاَّ صَلاَةَ الْمَغْرِبِ فَإِنَّهُ إِذَا أَعَادَهَا كَانَتْ شَفْعًا ‏.‏
Sunnah.com reference : Book 8, Hadith 13
USC-MSA web (English) reference : Book 8, Hadith 13
Arabic reference : Book 8, Hadith 302