Yazid prayed along with the Messenger of Allah ﷺ when he was a young boy. When he (the Prophet) had prayed there were two persons (sitting) in the corner of the mosque; they did not pray (along with the Prophet). He called for them. They were brought trembling (before him). He asked: What prevented you from praying along with us? They replied: We have already prayed in our houses. He said: Do not do so. If any of you prays in his house and finds that the imam has not prayed, he should pray along with him; and that will be a supererogatory prayer for him. (Using translation from Abū Dāʾūd 575)
أَنَّهُ صَلَّى مَعَ رَسُولِ اللهِ ﷺ صَلَاةَ الصُّبْحِ بِمِنًى وَهُوَ غُلَامٌ شَابٌّ فَلَمَّا صَلَّى رَسُولُ اللهِ ﷺ إِذَا هُوَ بِرَجُلَيْنِ لَمْ يُصَلِّيَا فَدَعَا بِهِمَا فَجِيءَ بِهِمَا تَرْعَدُ فَرَائِصُهُمَا فَقَالَ لَهُمَا مَا مَنَعَكُمَا أَنْ تُصَلِّيَا مَعَنَا؟ قَالَا قَدْ صَلَّيْنَا فِي رِحَالِنَا قَالَ فَلَا تَفْعَلَا إِذَا صَلَّيْتُمْ فِي رِحَالِكُمْ ثُمَّ أَدْرَكْتُمُ الْإِمَامَ لَمْ يُصَلِّ فَصَلِّيَا مَعَهُ فَهِيَ لَكُمْ نَافِلَةٌ