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.
tirmidhi:3301ʿAbd b. Ḥumayd > Yūnus > Shaybān > Qatādah > Anas b. Mālik

A Jew came to the Prophet of Allah and his Companions and said: “As-Samu Alaikum (Death be upon you).” So the people replied to him. The Prophet of Allah said: “Do you know what this person said?” They said: “Allah and His Messenger know better – he said the Salam – O Allah’s Prophet.” He said: “No, rather he said like this and that. Bring him back for e=me.” So they brought him back and he said: “Did you say As-Samu Alaikum? He said: “Yes.” So with that Allah’s Prophet said: “When one of the People of the Book gives you the Salam, then say: “Alaika Ma Qulta (Whatever you said to you too).” He said: ‘And when they come to you, they greet you with a greeting wherewith Allah greets you not.’  

Abū ʿĪsá said that this Ḥadīth is Ḥasan-Ṣaḥīḥ.
الترمذي:٣٣٠١حَدَّثَنَا عَبْدُ بْنُ حُمَيْدٍ حَدَّثَنَا يُونُسُ عَنْ شَيْبَانَ عَنْ قَتَادَةَ حَدَّثَنَا أَنَسُ بْنُ مَالِكٍ

أَنَّ يَهُودِيًّا أَتَى عَلَى النَّبِيِّ ﷺ وَأَصْحَابِهِ فَقَالَ السَّامُ عَلَيْكُمْ فَرَدَّ عَلَيْهِ الْقَوْمُ فَقَالَ نَبِيُّ اللَّهِ ﷺ هَلْ تَدْرُونَ مَا قَالَ هَذَا قَالُوا اللَّهُ وَرَسُولُهُ أَعْلَمُ سَلَّمَ يَا نَبِيَّ اللَّهِ قَالَ لاَ وَلَكِنَّهُ قَالَ كَذَا وَكَذَا رُدُّوهُ عَلَىَّ فَرَدُّوهُ قَالَ قُلْتَ السَّامُ عَلَيْكُمْ قَالَ نَعَمْ قَالَ نَبِيُّ اللَّهِ ﷺ عِنْدَ ذَلِكَ إِذَا سَلَّمَ عَلَيْكُمْ أَحَدٌ مِنْ أَهْلِ الْكِتَابِ فَقُولُوا عَلَيْكَ قَالَ عَلَيْكَ مَا قُلْتَ قَالَ (وإِذَا جَاءُوكَ حَيَّوْكَ بِمَا لَمْ يُحَيِّكَ بِهِ اللَّهُ )  

قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ

See similar narrations below:

Collected by Aḥmad
ahmad:13459ʿAbd al-Wahhāb > Saʿīd > Qatādah > Anas b. Mālik

A Jew came to the Prophet of Allah and his Companions and said: “As-Samu Alaikum (Death be upon you).” So the people replied to him. The Prophet of Allah said: “Do you know what this person said?” They said: “Allah and His Messenger know better – he said the Salam – O Allah’s Prophet.” He said: “No, rather he said like this and that. Bring him back for e=me.” So they brought him back and he said: “Did you say As-Samu Alaikum? He said: “Yes.” So with that Allah’s Prophet said: “When one of the People of the Book gives you the Salam, then say: “Alaika Ma Qulta (Whatever you said to you too).” He said: ‘And when they come to you, they greet you with a greeting wherewith Allah greets you not.’ (Using translation from Tirmidhī 3301)   

أحمد:١٣٤٥٩حَدَّثَنَا عَبْدُ الْوَهَّابِ عَنْ سَعِيدٍ عَنْ قَتَادَةَ عَنْ أَنَسِ بْنِ مَالِكٍ

أَنَّ يَهُودِيًّا مَرَّ عَلَى رَسُولِ اللهِ ﷺ وَأَصْحَابِهِ فَقَالَ السَّامُ عَلَيْكُمْ فَقَالَ نَبِيُّ اللهِ ﷺ أَتَدْرُونَ مَا قَالَ هَذَا؟ قَالُوا سَلَّمَ يَا رَسُولَ اللهِ قَالَ لَا وَلَكِنَّهُ قَالَ كَذَا وَكَذَا ثُمَّ قَالَ رُدُّوهُ عَلَيَّ فَرَدُّوهُ عَلَيْهِ فَقَالَ قُلْتَ السَّامُ عَلَيْكُمْ قَالَ نَعَمْ فَقَالَ نَبِيُّ اللهِ ﷺ عِنْدَ ذَلِكَ إِذَا سَلَّمَ عَلَيْكُمْ أَحَدٌ مِنْ أَهْلِ الْكِتَابِ فَقُولُوا وَعَلَيْكَ أَيْ وَعَلَيْكَ مَا قُلْتَ  

ahmad:13240ʿAbdullāh b. Bakr > Saʿīd > Qatādah > Anas

[Machine] A Jew came to the Prophet ﷺ while he was with his companions, and he said, "Peace be upon you." The people replied to him and said, "And upon you be peace, O Messenger of Allah." The Prophet ﷺ then asked them, "Do you know what he said?" They said, "Yes, he said, 'Peace be upon you.'" The Prophet ﷺ said, "Respond to him by saying, 'Upon you be the same.'" So they responded to the man and said, "Upon you be the same." Then the Prophet ﷺ asked the man, "Did you say such and such?" He said, "Yes." The Prophet ﷺ then said, "When anyone from the People of the Book greets you with peace, say, 'And upon you be peace,' meaning upon you be what you have said."  

أحمد:١٣٢٤٠حَدَّثَنَا عَبْدُ اللهِ بْنُ بَكْرٍ قَالَ أَخْبَرَنَا سَعِيدٌ عَنْ قَتَادَةَ عَنْ أَنَسٍ

أَنَّ يَهُودِيًّا أَتَى النَّبِيَّ ﷺ وَهُوَ مَعَ أَصْحَابِهِ فَقَالَ السَّامُ عَلَيْكُمْ فَرَدَّ عَلَيْهِ الْقَوْمُ فَقَالَ نَبِيُّ اللهِ ﷺ أَتَدْرُونَ مَا قَالَ؟ قَالُوا نَعَمْ قَالَ السَّامُ عَلَيْكُمْ قَالَ رُدُّوا عَلَيَّ الرَّجُلَ فَرَدُّوهُ فَقَالَ نَبِيُّ اللهِ ﷺ قُلْتَ كَذَا وَكَذَا؟ قَالَ نَعَمْ فَقَالَ نَبِيُّ اللهِ ﷺ إِذَا سَلَّمَ عَلَيْكُمْ أَحَدٌ مِنْ أَهْلِ الْكِتَابِ فَقُولُوا عَلَيْكَ أَيْ عَلَيْكَ مَا قُلْتَ