Hadith Q944
بِأَنَّ اللَّفْظَةَ الَّتِي ذَكَرْتُهَا فِي خَبَرِ ابْنِ عَبَّاسٍ لَفْظٌ عَامٌّ مُرَادُهُ خَاصٌّ، أَرَادَ أَنْ فَرَضَ الصَّلَاةَ فِي السَّفَرِ رَكْعَتَيْنِ خَلَا الْمَغْرِبِ
Because the words of the narration of Sayyiduna Ibn Abbas (may Allah be pleased with them both) are general, but what is meant by them is specific; his intention was that during travel, apart from Maghrib, the remaining prayers are obligatory as two rak‘ahs.
Hadith 944
Lady Aisha (may Allah be pleased with her) narrates that (in the beginning of Islam) two rak‘ahs of prayer were made obligatory in both travel and residence. Then, when the Messenger of Allah (peace be upon him) settled in Madinah Munawwarah, two rak‘ahs were added to the prayer in residence, while the Fajr prayer was kept at two rak‘ahs due to its lengthy recitation, and the Maghrib prayer was kept at three rak‘ahs because it is the witr (odd-numbered prayer) of the day.