Bulugh al-Maram 424
عَنْ عَائِشَةَ رَضِيَ اللَّهُ عَنْهَا قَالَتْ: أَوَّلُ مَا فُرِضَتْ الصَّلَاةُ رَكْعَتَيْنِ, فَأُقِرَّتْ صَلَاةُ السَّفَرِ وَأُتِمَّتْ صَلَاةُ الْحَضَرِ. مُتَّفَقٌ عَلَيْهِ. ⦗١٢٤⦘ وَلِلْبُخَارِيِّ: ثُمَّ هَاجَرَ, فَفُرِضَتْ أَرْبَعًا, وَأُقِرَّتْ صَلَاةُ السَّفَرِ عَلَى الْأَوَّلِ.
ʿAʾishah, may Allah be pleased with her, said: When the prayer was first prescribed, it was two rakʿahs. Then the prayer of travel was kept [as it was], and the prayer of residence was completed. Agreed upon. And al-Bukhari has: Then he made hijrah, and it was prescribed as four, and the prayer of travel was kept as it was at first.