Musnad Ahmad 11
It was narrated from Anas that Abu Bakr told him:
I said to the Prophet (ﷺ) when he was in the cave - on one occasion he said: when we were in the cave -: If one of them looks at his feet, he will see us beneath his feet.
He said: `O Abu Bakr, what do you think of two, of whom Allah is the third?`
حَدَّثَنَا عَفَّانُ، قَالَ حَدَّثَنَا هَمَّامٌ، قَالَ أَخْبَرَنَا ثَابِتٌ، عَنْ أَنَسٍ، أَنَّ أَبَا بَكْرٍ، حَدَّثَهُ قَالَ قُلْتُ لِلنَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَهُوَ فِي الْغَارِ وَقَالَ مَرَّةً وَنَحْنُ فِي الْغَارِ لَوْ أَنَّ أَحَدَهُمْ نَظَرَ إِلَى قَدَمَيْهِ لَأَبْصَرَنَا تَحْتَ قَدَمَيْهِ قَالَ فَقَالَ يَا أَبَا بَكْرٍ مَا ظَنُّكَ بِاثْنَيْنِ اللَّهُ ثَالِثُهُمَا‏.‏