[Machine] He (the Prophet Muhammad ﷺ) said, "He performed the prayer of fear with us." He performed two units of prayer with some of his companions, then he finished and they stayed behind. Others came and they were in their place, so he performed two units of prayer with them and then finished. So the Prophet ﷺ performed four units of prayer and the others performed two units of prayer.
أَنَّهُ قَالَ صَلَّى بِنَا النَّبِيُّ ﷺ صَلَاةَ الْخَوْفِ فَصَلَّى بِبَعْضِ أَصْحَابِهِ رَكْعَتَيْنِ ثُمَّ سَلَّمَ فَتَأَخَّرُوا وَجَاءَ آخَرُونَ فَكَانُوا فِي مَكَانِهِمْ فَصَلَّى بِهِمْ رَكْعَتَيْنِ ثُمَّ سَلَّمَ فَصَارَ لِلنَّبِيِّ ﷺ أَرْبَعُ رَكَعَاتِ وَلِلْقَوْمِ رَكْعَتَانِ رَكْعَتَانِ