From Sahih Muslim (Hadith 1571):
A'isha, the wife of the Messenger of Allah (ﷺ), said Allah prescribed the prayer as two rak'ahs, then it was completed (to four rak'ahs) at the place of residence, but was retained in the same position in journey as it was first made obligatory
Reference: Muslim 1571