كتاب صلاة المسافرين وقصرها
6  
The Book of Prayer - Travellers
(1)
Chapter: The travelers’ prayer and shortening it
(1)
باب صَلاَةِ الْمُسَافِرِينَ وَقَصْرِهَا ‏‏
Sahih Muslim 693 a

Anas b. Malik reported:

We went out from Medina to Mecca with the Messenger of Allah (ﷺ) and he prayed two rak'ahs at each time of prayer till we returned to Medina. I said: For how long did he stay in Mecca? He said: (For) ten (days).
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى التَّمِيمِيُّ، أَخْبَرَنَا هُشَيْمٌ، عَنْ يَحْيَى بْنِ أَبِي إِسْحَاقَ، عَنْ أَنَسِ بْنِ مَالِكٍ، قَالَ خَرَجْنَا مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم مِنَ الْمَدِينَةِ إِلَى مَكَّةَ فَصَلَّى رَكْعَتَيْنِ رَكْعَتَيْنِ حَتَّى رَجَعَ ‏.‏ قُلْتُ كَمْ أَقَامَ بِمَكَّةَ قَالَ عَشْرًا ‏.‏
Reference : Sahih Muslim 693a
In-book reference : Book 6, Hadith 17
USC-MSA web (English) reference : Book 4, Hadith 1473
  (deprecated numbering scheme)