Muwatta Malik Book 8, Hadith 10
Yahya related to me from Malik from Nafi that a man asked
Abdullah ibn Umar, "Sometimes I pray in my house, and then catch the
prayer with the imam. Should I pray with him?" Abdullah ibn Umar said
to him, "Yes," and the man said, "Which of them do I make my prayer?"
Abdullah ibn Umar said, "Is that up to you? It is up to Allah. He will
decide on whichever of them He wishes."
Yahya related to me from Malik from Zayd ibn Aslam from a man of the Bani'd-Dil called Busr ibn Mihjan from his father Mihjan that he was in a gathering with the Messenger of Allah, may Allah bless him and grant him peace, and the call to prayer was made. The Messenger of Allah, may Allah bless him and grant him peace, rose and prayed and then returned. Mihjan remained sitting and did not pray with him. The Messenger of Allah, may Allah bless him and grant him peace, said, "What prevented you from praying with the people? Aren't you a muslim?" He said, "Of course, Messenger of Allah, but I have already prayed with my family." The Messenger of Allah, may Allah bless him and grant him peace, said, "When you come, pray with the people, even if you have prayed already."
Yahya related to me from Malik from Yahya ibn Said that a man asked Said ibn al-Musayyab, "I pray in my house, and then I come to the mosque and find the imam praying. Should I pray with him?" Said said, "Yes," and the man said, "Which of them is my prayer?" Said said, "Are you the one to decide that? That is up to Allah."