Ayesha reported,

The prayer was originally prescribed as two rakahs. Then the Prophet ﷺ migrated, and it was made four rakahs, while the prayer during travel was left as it was originally prescribed.Abdul-Razzaq narrated it similarly from Muamar.

Bukhari 3935

Sahih

حدثنا مسدد حدثنا يزيد بن زريع حدثنا معمر عن الزهري عن عروة

عن عائشة رضي الله عنها قالت

فرضت الصلاة ركعتين ثم هاجر النبي ﷺ ففرضت أربعا وتركت صلاة السفر على الأولى تابعه عبد الرزاق عن معمر

البخاري 3935صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Virtues of the Ansar
Chapter
History, from where they dated history
Numbering
Darussalam 3935
Bukhari 3935