Praise be to Allah.
Muslim reported in his Saheeh (14/144) from Anas ibn Malik that the Messenger of Allah (peace and blessings of Allah be upon him) said: “When the People of the Book say salaam to you (greet you by saying al-salamu alaykum), say ‘Wa ‘alaykum’ (and unto you).’” According to another report, he was asked, “The People of the Book say salaam to us. How should we respond?” He said, “Say, ‘Wa ‘alaykum.’” According to another report (14/164), he said, “When the Jews greet you, they say ‘al-saam ‘alaykum (death be upon you). So say ‘ ‘alayk (upon you).’” According to another report he said, “So say, ‘wa ‘alayk’ (and upon you).” According to another report (14/146) a group of Jews asked for permission to enter upon the Messenger of Allah (peace and blessings of Allah be upon him), and they said, “Al-saam ‘alaykum (death be upon you).” ‘Aa’ishah said, “Bal ‘alaykum al-saam wa’l-la’nah (No, death be upon you and curses)!” The Messenger of Allah (peace and blessings of Allah be upon him) said, “O ‘Aa’ishah, Allah loves gentleness in all things.” She said, “Did you not hear what they said?” He said, “I answered, ‘Wa ‘alaykum (and unto you).’” According to another report, he said, “I answered, ‘ ‘alaykum’” – without the “waw” (i.e., wa meaning “and”). According to the last hadeeth (14/148), he said, “Do not initiate the greeting of salaam with the Jews and Christians, and if you meet one of them on the road, push him to the narrowest part of it.”
All of these reports were narrated in the Saheeh of Imaam Muslim.
Al-Nawawi (may Allah have mercy on him) said in his commentary (14/144-145):
The scholars agree that the greeting of the People of the Book should be returned, if they greet us with salaam, but we should not say to them, “Wa ‘alaykum al-salaam (and upon you be peace).” We should say only “ ‘alaykum (upon you)” or “wa ‘alaykum (and upon you).” Ahaadeeth have been narrated by Muslim both with and without the “wa” (“And”), but most of them include it. On this basis, there are two meanings, one of which is the apparent meaning: if they say “ ‘Alaykum al-mawt (death be upon you)”, then one should say, “Wa ‘alaykum (and also on you)” – meaning that we and you are alike, we are all going to die. The second meaning is that this is a waw that is used to start a new idea or phrase, not to connect it to the previous sentence or to reiterate the same idea. This implies: and upon you be what you deserve of condemnation. The phrase without the wa implies: but rather death should be upon you. Al-Qaadi said: some of the scholars, including Ibn Habeeb al-Maliki, preferred to use the phrase without the wa, so that it would not have the implication that these people are like the Muslims. Others said that it should be used with the wa as it appears in the majority of reports. Some of them said: he should reply “ ‘alaykum al-silaam (and upon you be stones) – but this is da’eef (weak). Al-Khattaabi said: most of the muhadditheen (scholars of hadeeth) reported it with the wa (wa ‘alaykum), but Ibn ‘Uyaynah reported it without the waw. Al-Khattaabi said: this is what is correct, because if the phrase is used without the waw, this means that what they are saying is returned specifically and exclusively to them, but if the waw is used, it implies commonality with them in what they are saying. This is the view of al-Khattaabi. But the correct view is that it is permissible either to use the waw or omit it, as both have been mentioned in saheeh reports, but including the waw is better, as it appears in most of the reports. There is nothing wrong with that, because al-saam means death, which will come to us and to them, so there is no harm in including the waw. The scholars differed as to returning the greeting of salaam when a kaafir initiates it or initiating the greeting. Our opinion is that it is haraam to initiate the greeting, but we have to return their greeting by saying “Wa ‘alaykum” or just “ ‘alaykum.” Our evidence with regard to initiating the greeting is the hadeeth of the Prophet (peace and blessings of Allah be upon him), “Do not initiate the greeting with the Jews and Christians” and his command to reply by saying, “Wa ‘alaykum.” What we have mentioned as our madhhab or point of view is also the opinion of most of the scholars and the majority of the salaf… It is permissible to initiate the greeting when addressed to a group composed of both Muslims and kaafirs, or one Muslim and a number of kaafirs, but he should intend the greeting to be directed towards the Muslim(s) among them, because the Prophet (peace and blessings of Allah be upon him) greeted an assembly that included a mixture of Muslims and mushrikeen.