Sayyiduna Abu Hurairah (may Allah be pleased with him) reports that the Messenger of Allah (peace and blessings be upon him) said: "When any of you comes to a gathering, he should greet them with salam, and when he gets up to leave, he should (again) greet them with salam. The first salam is not more deserving than the second salam."
Explanation & Benefits
Shaykh Dr. Abdur Rahman Freywai
Explanation:
1:
That is, both greetings (salams) hold equal importance and necessity. Just as one should offer salam upon joining a gathering, likewise, when departing from the gathering, one should also leave by offering a prayer of peace (salam) to everyone.
Source: Sunan al-Tirmidhi – Majlis ‘Ilmi Dar al-Da‘wah, New Delhi Edition, Page: 2706
Shaykh Umar Farooq Saeedi
Benefits and Issues:
It is obligatory to say salam both upon arriving at a gathering and upon returning.
It is not the case that it is obligatory the first time but not required upon returning.
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 5208
Shaykh Muhammad Ibrahim bin Basheer
Benefit:
From this hadith, the importance of saying "as-salamu alaykum" becomes clear: when you enter a gathering, you should say "as-salamu alaykum," and when you leave, you should again say "as-salamu alaykum." Just as saying salam upon entering a gathering is a virtuous deed, likewise, saying salam when leaving the gathering is also a virtuous deed. One should not be negligent in saying salam at both of these times. Some people say salam when entering a gathering but do not say salam when leaving, which is not correct.
Source: Musnad al-Humaydi: Commentary by Muhammad Ibrahim bin Bashir, Page: 1194