When Allah first prescribed the prayer, He prescribed it as two rakats. Then He completed it for the resident, while the prayer of the traveler was left as it was originally prescribed.
و حدثني أبو الطاهر وحرملة بن يحيى قالا حدثنا ابن وهب عن يونس عن ابن شهاب قال حدثني عروة بن الزبير أن
فرض الله الصلاة حين فرضها ركعتين ثم أتمها في الحضر فأقرت صلاة السفر على الفريضة الأولى