Sunnah.com : Book 8, Hadith 13
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ نَافِعٍ، أَنَّ عَبْدَ اللَّهِ بْنَ عُمَرَ، كَانَ يَقُولُ مَنْ صَلَّى الْمَغْرِبَ أَوِ الصُّبْحَ ثُمَّ أَدْرَكَهُمَا مَعَ الإِمَامِ فَلاَ يَعُدْ لَهُمَا . قَالَ مَالِكٌ وَلاَ أَرَى بَأْسًا أَنْ يُصَلِّيَ مَعَ الإِمَامِ مَنْ كَانَ قَدْ صَلَّى فِي بَيْتِهِ إِلاَّ صَلاَةَ الْمَغْرِبِ فَإِنَّهُ إِذَا أَعَادَهَا كَانَتْ شَفْعًا .
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."
Full reference and source
Sunnah.com : Book 8, Hadith 13 USC-MSA web (English) : Book 8, Hadith 13 Arabic : Book 8, Hadith 302
View source on Sunnah.com (opens in a new tab)