Yahya related to me from Malik from Nafi that Abdullah ibn Umarused to say, "Someone who prays maghrib or subh and then catches themwith the imam should not repeat them."Malik said, "I do notsee any harm in someone who has already prayed in his house prayingwith the imam, except for maghrib, because if he repeats it, he makesit even."
App reference: Book 8, Hadith 13
USC-MSA web (English) reference: Book 8, Hadith 13
Arabic reference: Book 8, Hadith 302
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.