All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
It is Islamically permissible for a man to greet a woman with Salaam and vice-versa, and it is permissible for each of them to respond to the other if one is safe from temptation.
Al-Bukhaari wrote a Chapter in his Saheeh: “Chapter: Greeting of men to women, and women to men”.
Under this Chapter, he reported the Hadeeth of Sahl who narrated: “We used to feel happy on Fridays.” I [Abu Haazem (the narrator) asked Sahl, “Why?” He said, “There was an old woman of our acquaintance who used to send somebody to Budha'ah (Ibn Maslamah said, “Budha'ah was a garden of date-palms in Medeenah). She used to pull out the silq (a kind of vegetable) from its roots and put it in a cooking pot, adding some barley over it (and cook it). After finishing the Jumu’ah (Friday) prayer, we used to (pass by her and) greet her, whereupon she would give us with that food, so we used to feel happy because of that. We used to have neither a midday nap nor a lunch except after the Friday prayer.”
Ibn Hajar said: “What is meant by it (the greeting) being permissible, is when one is safe from getting tempted.” [End of quote]
For more benefit, please refer to Fataawa 347464, 82299, and 85855.
Allah knows best.