[When they entered upon him] in the form of humans, [and said, "Peace."]—meaning: they greeted him. [He said, "Peace,"]—responding to them. ["(You are) a people unknown."]—he did not recognize them because they did not eat from his food.
Muhammad said: ["They said, 'Peace'" (qālan salāman)] is in the accusative case [by implication]: We greet you with a peace (salāman).
And his saying: ["He said, 'Peace'" (qāla salāmun)] is in the nominative case with the meaning: He said, "Peace be upon you (salāmun ʿalaykum)." It is also permissible that it is in the sense of: Our matter is peace.
﴿إِذْ دخلُوا عَلَيْهِ﴾ فِي صُورَة الْآدَمِيّين ﴿فَقَالُوا سَلامًا﴾ أَي: سلمُوا عَلَيْهِ ﴿قَالَ سَلامٌ﴾ رد عَلَيْهِم ﴿قوم منكرون﴾ أنكرهم حِين لمْ يَأْكُلُوا من طَعَامه.
قَالَ محمدٌ: ﴿قَالُوا سَلامًا﴾ منصوبٌ [بِتَقْدِير]. سلّمنا عَلَيْك سَلاما.
وَقَوله: ﴿قَالَ سَلام﴾ مَرْفُوع بِمَعْنى: قَالَ: سلامٌ عَلَيْكُم، وَيَجُوزُ أَنْ يَكُونَ عَلَى مَعْنَى: أمرنَا سَلام.