The greeting of Adam (peace be upon him) and his offspring
The Prophet (sal Allahu alaihi wa sallam) said, “When Allah created Adam (Alaihi assalam) He said to him: ‘Go and greet that company of angels who are sitting there – and then listen to what they are going to say in reply to your greetings because that will be your greeting and your off-spring’s.’ Adam (Alaihi assalam) said to the angels: ‘As-Salamu ‘Alaikum (may you be safe from evil).’ They replied: ‘As-Salamu ‘Alaikum wa Rahmatullah (may you be safe from evil, and Mercy of Allah be upon you).’ Thus adding in reply to him: ‘wa Rahmatullah (and Mercy of Allah)’ to his greeting.”
[Sahih Al-Bukhari and Muslim]
We benefit from the above Hadith that the greeting – As-Salamu ‘Alaikum has been in existence since the days of Prophet Adam (Alaihi assalam).
In other Ahadith we also learn that it is better to add to the above response: wa Rahmatullahi wa Barakatuhu (and the Mercy and Blessings of Allah).
And Allah knows best!