Language:
كتاب فضائل أصحاب النبى صلى الله عليه وسلم
62  
Companions of the Prophet
(2)
Chapter: The virtues of the emigrants (i.e., Muhajirin)
(2)
باب مَنَاقِبِ الْمُهَاجِرِينَ وَفَضْلِهِمْ
Sahih al-Bukhari 3653

Narrated Abu Bakr:

I said to the Prophet (ﷺ) while I was in the Cave. "If any of them should look under his feet, he would see us." He said, "O Abu Bakr! What do you think of two (persons) the third of whom is Allah?"

حَدَّثَنَا مُحَمَّدُ بْنُ سِنَانٍ، حَدَّثَنَا هَمَّامٌ، عَنْ ثَابِتٍ، عَنْ أَنَسٍ، عَنْ أَبِي بَكْرٍ ـ رضى الله عنه ـ قَالَ قُلْتُ لِلنَّبِيِّ صلى الله عليه وسلم وَأَنَا فِي الْغَارِ لَوْ أَنَّ أَحَدَهُمْ نَظَرَ تَحْتَ قَدَمَيْهِ لأَبْصَرَنَا‏.‏ فَقَالَ ‏ "‏ مَا ظَنُّكَ يَا أَبَا بَكْرٍ بِاثْنَيْنِ اللَّهُ ثَالِثُهُمَا ‏"‏‏.‏
Reference : Sahih al-Bukhari 3653
In-book reference : Book 62, Hadith 5
USC-MSA web (English) reference : Vol. 5, Book 57, Hadith 5
  (deprecated numbering scheme)