كتاب المغازى
64  
Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi)
(85)
Chapter: The death of the Prophet (saws)
(85)
باب وَفَاةِ النَّبِيِّ صلى الله عليه وسلم
Sahih al-Bukhari 4464, 4465

Narrated Aisha and Ibn `Abbas:

The Prophet (ﷺ) stayed for ten years in Mecca with the Qur'an being revealed to him and he stayed in Medina for ten years.'

حَدَّثَنَا أَبُو نُعَيْمٍ، حَدَّثَنَا شَيْبَانُ، عَنْ يَحْيَى، عَنْ أَبِي سَلَمَةَ، عَنْ عَائِشَةَ، وَابْنِ، عَبَّاسٍ رضى الله عنهم أَنَّ النَّبِيَّ صلى الله عليه وسلم لَبِثَ بِمَكَّةَ عَشْرَ سِنِينَ يُنْزَلُ عَلَيْهِ الْقُرْآنُ، وَبِالْمَدِينَةِ عَشْرًا‏.‏
Reference : Sahih al-Bukhari 4464, 4465
In-book reference : Book 64, Hadith 480
USC-MSA web (English) reference : Vol. 5, Book 59, Hadith 741
  (deprecated numbering scheme)