وَعَن بسر بن محجن عَن أَبِيه أَنَّهُ كَانَ فِي مَجْلِسٍ مَعَ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَأُذِّنَ بِالصَّلَاةِ فَقَامَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَصَلَّى وَرَجَعَ وَمِحْجَنٌ فِي مَجْلِسِهِ فَقَالَ لَهُ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَا مَنَعَكَ أَنْ تُصَلِّيَ مَعَ النَّاسِ؟ أَلَسْتَ بِرَجُلٍ مُسْلِمٍ؟» فَقَالَ: بَلَى يَا رَسُولَ اللَّهِ وَلَكِنِّي كُنْتُ قَدْ صَلَّيْتُ فِي أَهْلِي فَقَالَ لَهُ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِذَا جِئْتَ الْمَسْجِدَ وَكُنْتَ قَدْ صَلَّيْتَ فَأُقِيمَتِ الصَّلَاةُ فَصَلِّ مَعَ النَّاسِ وَإِنْ كُنْتَ قَدْ صَلَّيْتَ» . رَوَاهُ مَالك وَالنَّسَائِيّ
Translation

Ibn ‘Umar said that a man questioned him saying, “When I pray in my house and then come to the mosque in time for prayer along with the imam, should I pray along with him?” He replied, “Yes.” The man asked which of them he should consider his obligatory prayer, and Ibn ‘Umar replied, “Is that your affair?* that is only to be left to God’s decision who will appoint whichever He wishes.” *The Arabic is in the form of a statement, but in view of the phrase immediately following it seems necessary to treat it as a question.Malik transmitted it.