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

Yahya related to me from Malik from Yahya ibn Said that a manasked Said ibn al-Musayyab, "I pray in my house, and then I come tothe mosque and find the imam praying. Should I pray with him?" Saidsaid, "Yes," and the man said, "Which of them is my prayer?" Saidsaid, "Are you the one to decide that? That is up to Allah."