Muwatta Malik, Book 8, Hadith 300 (In-Book)

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

وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ يَحْيَى بْنِ سَعِيدٍ، أَنَّ رَجُلاً، سَأَلَ سَعِيدَ بْنَ الْمُسَيَّبِ فَقَالَ إِنِّي أُصَلِّي فِي بَيْتِي ثُمَّ آتِي الْمَسْجِدَ فَأَجِدُ الإِمَامَ يُصَلِّي أَفَأُصَلِّي مَعَهُ فَقَالَ سَعِيدٌ نَعَمْ ‏.‏ فَقَالَ الرَّجُلُ فَأَيُّهُمَا صَلاَتِي فَقَالَ سَعِيدٌ أَوَأَنْتَ تَجْعَلُهُمَا إِنَّمَا ذَلِكَ إِلَى اللَّهِ ‏.‏

sunnah.com

also referenced under: Book 8, Hadith 11 (USC-MSA)