It was narrated that Ibn ‘Umar said:“When the Messenger of Allah (ﷺ) went out from this city (Al-Madinah) he did not perform more than two Rak’ah for prayer until he returned.”
حَدَّثَنَا أَحْمَدُ بْنُ عَبْدَةَ، أَنْبَأَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ بِشْرِ بْنِ حَرْبٍ، عَنِ ابْنِ عُمَرَ، قَالَ كَانَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ إِذَا خَرَجَ مِنْ هَذِهِ الْمَدِينَةِ لَمْ يَزِدْ عَلَى رَكْعَتَيْنِ، حَتَّى يَرْجِعَ إِلَيْهَا .
IbnMaja
Establishing the Prayer and the Sunnah Regarding Them • Hadith 1067