The Statement of Allah: “...The second of two, when they (Muhammad ﷺ and Abü Bakr were in the cave, and he ﷺ said to his companion (Abu Bakr ) ‘Be not sad (or afraid), surely Allah is with us.'" (V.9:40) Sahih al-Bukhari 4663

Arabic hadith text
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مُحَمَّدٍ، حَدَّثَنَا حَبَّانُ، حَدَّثَنَا هَمَّامٌ، حَدَّثَنَا ثَابِتٌ، حَدَّثَنَا أَنَسٌ، قَالَ حَدَّثَنِي أَبُو بَكْرٍ ـ رضى الله عنه ـ قَالَ كُنْتُ مَعَ النَّبِيِّ صلى الله عليه وسلم فِي الْغَارِ، فَرَأَيْتُ آثَارَ الْمُشْرِكِينَ قُلْتُ يَا رَسُولَ اللَّهِ، لَوْ أَنَّ أَحَدَهُمْ رَفَعَ قَدَمَهُ رَآنَا‏.‏ قَالَ ‏"‏مَا ظَنُّكَ بِاثْنَيْنِ اللَّهُ ثَالِثُهُمَا ‏"
Translation
Narrated Abu Bakr

I was in the company of the Prophet (ﷺ) in the cave, and on seeing the traces of the pagans, I said, "O Allah's Messenger (ﷺ) If one of them (pagans) should lift up his foot, he will see us." He said, "What do you think of two, the third of whom is Allah?"