[Machine] The prayer consists of two units of prayer, except for Maghrib, which consists of three units. The Messenger of Allah ﷺ used to pray the first prayer while traveling, and when he stayed, he would add two units of prayer with each unit of prayer, except for Maghrib, because it is an odd number. As for Fajr, the recitation is longer in it.
الصَّلَاةُ رَكْعَتَيْنِ رَكْعَتَيْنِ إِلَّا الْمَغْرِبَ فُرِضَتْ ثَلَاثًا وَكَانَ رَسُولُ اللهِ ﷺ إِذَا سَافَرَ صَلَّى الصَّلَاةَ الْأُولَى وَإِذَا أَقَامَ زَادَ مَعَ كُلِّ رَكْعَتَيْنِ رَكْعَتَيْنِ إِلَّا الْمَغْرِبَ لِأَنَّهَا وِتْرٌ وَالصُّبْحُ تَطُولُ فِيهَا الْقِرَاءَةُ هَكَذَا