[Machine] "When a person joins the Imam for one unit of the Maghrib prayer, he should sit with the Imam. Then, when the Imam says the Salam, he should stand and perform the second unit, then sit in it and recite the Tashahhud. After that, he should stand and perform the third unit, and recite the Tashahhud in it. Then, he should say the Salam. The recommended prayers during the sitting in any of them, Zechariah said that Said ibn Al-Musayyib told me about three units in which the Tashahhud is recited three times. When he was asked about it, he said, 'That is the Maghrib prayer, in which the person precedes it with one unit, then catches up with two units, and recites the Tashahhud in them.'"
أَنَّ السُّنَّةَ إِذَا أَدْرَكَ الرَّجُلُ رَكْعَةً مِنْ صَلَاةِ الْمَغْرِبِ مَعَ الْإِمَامِ أَنْ يَجْلِسَ مَعَ الْإِمَامِ فَإِذَا سَلَّمَ الْإِمَامُ قَامَ فَرَكَعَ الثَّانِيَةَ فَجَلَسَ فِيهَا وَتَشَهَّدَ ثُمَّ قَامَ فَرَكَعَ الرَّكْعَةَ الثَّالِثَةَ فَتَشَهَّدَ فِيهَا ثُمَّ سَلَّمَ وَالصَّلَوَاتُ عَلَى هَذِهِ السُّنَّةِ فِيمَا يَجْلِسُ فِيهِ مِنْهُنَّ قَالَ الزُّهْرِيُّ قَالَ سَعِيدُ بْنُ الْمُسَيِّبِ حَدِّثُونِي بِثَلَاثِ رَكَعَاتٍ يُتَشَهَّدُ فِيهِنَّ ثَلَاثَ مَرَّاتٍ فَإِذَا سُئِلَ عَنْهَا قَالَ تِلْكَ صَلَاةُ الْمَغْرِبِ يُسْبَقُ الرَّجُلُ مِنْهَا بِرَكْعَةٍ ثُمَّ يُدْرِكُ رَكْعَتَيْنِ فَيَتَشَهَّدُ فِيهِمَا