Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
malik:8-13Mālik > Nāfiʿ

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."  

مالك:٨-١٣وَحَدَّثَنِي عَنْ مَالِكٍ عَنْ نَافِعٍ

أَنَّ عَبْدَ اللَّهِ بْنَ عُمَرَ كَانَ يَقُولُ مَنْ صَلَّى الْمَغْرِبَ أَوِ الصُّبْحَ ثُمَّ أَدْرَكَهُمَا مَعَ الإِمَامِ فَلاَ يَعُدْ لَهُمَا قَالَ مَالِكٌ وَلاَ أَرَى بَأْسًا أَنْ يُصَلِّيَ مَعَ الإِمَامِ مَنْ كَانَ قَدْ صَلَّى فِي بَيْتِهِ إِلاَّ صَلاَةَ الْمَغْرِبِ فَإِنَّهُ إِذَا أَعَادَهَا كَانَتْ شَفْعًا