Sahih al-Bukhari, Volume 2, Book 21, Hadith 285 (USC-MSA) ⓘ
Narrated Ibn `Umar: The Prophet used to go to the Mosque of Quba (sometimes) walking and sometimes riding. Added Nafi` (in another narration), "He then would offer two rak`at (in the Mosque of Quba)."
حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا يَحْيَى، عَنْ عُبَيْدِ اللَّهِ، قَالَ حَدَّثَنِي نَافِعٌ، عَنِ ابْنِ عُمَرَ ـ رضى الله عنهما ـ قَالَ كَانَ النَّبِيُّ صلى الله عليه وسلم يَأْتِي قُبَاءً رَاكِبًا وَمَاشِيًا. زَادَ ابْنُ نُمَيْرٍ حَدَّثَنَا عُبَيْدُ اللَّهِ عَنْ نَافِعٍ فَيُصَلِّي فِيهِ رَكْعَتَيْنِ.
also referenced under: Book 20, Hadith 6 (In-Book) & Hadith 1194 (DarusSalam)