[Machine] People during the time of the Messenger of Allah ﷺ used to ask someone who arrived late for prayer to lead them in prayer, indicating the number of units they missed. Then, they would join the latecomer in their prayer. Once, Mu'adh and the people were sitting, and they were in the midst of their prayer. Mu'adh joined them and when the Messenger of Allah ﷺ completed the prayer, he stood up and offered the missed units. Then, the Messenger of Allah ﷺ said, "Do as Mu'adh bin Jabal did."
كَانَ النَّاسُ عَلَى عَهْدِ رَسُولِ اللهِ ﷺ إِذَا سُبِقَ أَحَدُهُمْ بِشَيْءٍ مِنَ الصَّلَاةِ سَأَلَهُمْ فَأَشَارُوا إِلَيْهِ بِالَّذِي سُبِقَ بِهِ فَيُصَلِّي مَا سُبِقَ بِهِ ثُمَّ يَدْخُلُ مَعَهُمْ فِي صَلَاتِهِمْ فَجَاءَ مُعَاذٌ وَالْقَوْمُ قُعُودٌ فِي صَلَاتِهِمْ فَقَعَدَ مَعَهُمْ فَلَمَّا سَلَّمَ رَسُولُ اللهِ ﷺ قَامَ فَقَضَى مَا سُبِقَ بِهِ فَقَالَ رَسُولُ اللهِ ﷺ «اصْنَعُوا مَا صَنَعَ مُعَاذُ بْنُ جَبَلٍ»