Abu Bakr reported that he said to the Prophet ﷺ while they were in the cave, "If any one of them were to look down at his feet, he would see us beneath them."The Prophet ﷺ replied, "Abu Bakr, what do you think of two whose third is Allah?"He said, this is a hasan sahih gharib hadith. It is known only through the narration of Hammam, who is alone in transmitting it. Hibban bin Hilal and several others have narrated this hadith from Hammam in similar wording.
حدثنا زياد بن أيوب البغدادي حدثنا عفان بن مسلم حدثنا همام حدثنا ثابت
أن أبا بكر حدثه قال قلت للنبي ﷺ ونحن في الغار لو أن أحدهم ينظر إلى قدميه لأبصرنا تحت قدميه فقال يا أبا بكر ما ظنك باثنين الله ثالثهما قال هذا حديث حسن صحيح غريب إنما يعرف من حديث همام تفرد به وقد روى هذا الحديث حبان بن هلال وغير واحد عن همام نحو هذا
Agreed upon [by Bukhari and Muslim]. It was also narrated by Muslim in Fadail al-Sahabah, chapter "On the Virtues of Abu Bakr Siddiq" , hadith no. 2381, and Bukhari, hadith no. 3653, from the hadith of Hammam, with the same wording.