Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:51:25

When they entered upon him and said, "˹We greet you with˺ peace." He answered, "˹And upon you˺ peace, ˹you are˺ a people unknown.  

When (idh is an adverbial qualifier of hadīthu dayfi, ‘the story of the guests’) they entered upon him and said, ‘Peace!’ — in other words ˹they said˺ these very words. He said, ‘Peace!’ — ˹also˺ these very words — ˹These are˺ an unfamiliar folk, whom we do not know — he said this to himself (qawmun munkarūna is the predicate of an implicit subject such as hā’ūlā’i, ‘these are’).
القرآن:٥١:٢٥

إِذْ دَخَلُوا عَلَيْهِ فَقَالُوا سَلَامًا ۖ قَالَ سَلَامٌ قَوْمٌ مُنْكَرُونَ  

{إذ} ظرف لحديث ضيف {دخلوا عليه فقالوا سلاما} أي هذا اللفظ {قال سلام} أي هذا اللفظ {قوم منكرون} لا نعرفهم قال ذلك في نفسه وهو خبر مبتدأ مقدر أي هؤلاء.

See similar narrations below:

Collected by Qurʾān
quran:15:52

When they entered upon him and said, "Peace." ˹Abraham˺ said, "Indeed, we are fearful of you."  

˹how˺ when they entered unto him, and said, ‘Peace!’, that is, ˹they said˺ this very word (salām). He, Abraham, said, after having offered them food which they did not eat: ‘Lo! we are afraid of you’.
القرآن:١٥:٥٢

إِذْ دَخَلُوا عَلَيْهِ فَقَالُوا سَلَامًا قَالَ إِنَّا مِنْكُمْ وَجِلُونَ  

{إذ دخلوا عليه فقالوا سلاما} أي هذا اللفظ {قال} إبراهيم لما عرض عليم الأكل فلم يأكلوا {إنا منكم وجلون} خائفون.