The Sunnah is for one who is walking to greet one who is sitting, and for one who is riding to great one who is walking, and for the younger to greet the older, and for one who is coming in to greet the people who are in a place, because Allaah says (interpretation of the meaning):
“But when you enter the houses, greet one another with a greeting from Allaah (i.e. say: As‑Salaamu ‘Alaykum — peace be on you), blessed and good”
And the Prophet (peace and blessings of Allaah be upon him) said: “The one who is riding should greet the one who is walking, and the one who is walking should greet the one who is sitting, and the smaller group should greet the larger group.” Al-Bukhaari, 6234; Muslim, 2160. According to a report narrated by al-Bukhaari: “One who is passing should greet one who is sitting.”
It is well known that initiating the greeting of salaam is Sunnah and is mustahabb (encouraged), and responding is waajib (obligatory).
If the one who is coming in does not say salaam, but the one who is in the house does say it, or if the one who is walking does not say salaam but the one who is sitting does say it, there is nothing wrong with that, rather he has done something good and has fulfilled the Sunnah of salaam, and the other one is obliged to respond.
Al-Nawawi (may Allaah have mercy on him) said: Note that initiating the greeting of salaam is Sunnah and mustahabb, but not obligatory. It is Sunnah on the basis of kafaayah (a communal Sunnah). If it is a group that is giving the greeting, it is sufficient for one of them to say the salaam, but if all of them say salaam, that is better… As for returning the greeting, if it is one person that is greeted, he is obliged, on an individual basis, to return the greeting, but if it is a group then responding to the greeting is a communal obligation (fard kafaayah) for them; if one of them responds, then there is no blame on the others, but if all of them fail to respond, then all of them have sinned. If they all return the greeting, this is best. This is the view of our companions and it is clear and good. End quote from al-Adhkaar, p. 356
Then he (may Allaah have mercy on him) said: Chapter on etiquette and issues of greeting with salaam. It is narrated in Saheeh al-Bukhaari and Saheeh Muslim that Abu Hurayrah (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “The one who is riding should greet the one who is walking, the one who is walking should greet the one who is sitting, and the smaller group should greet the larger group.” According to a report narrated by al-Bukhaari: “The younger should greet the older, and the one who is walking should greet the one who is sitting, and the smaller group should greet the larger group.”
Our companions and other scholars said: What is mentioned here is the Sunnah, but if they do it differently and one who is walking greets one who is riding or one who is sitting greets one who is riding or walking, that is not makrooh. This was clearly stated by Imam Abu Sa’d al-Mutawalli and others. Based on this, it is not makrooh for a large group to greet a smaller group first, or for an older person to greet a younger person first. End quote from al-Adhkaar, p. 369
Al-Haafiz ibn Hajar narrated that al-Maaziri said: If one who is walking initiates the greeting and says salaam to one who is riding, that does not mean that he is not following the command to spread the greeting of salaam, but paying attention to what is proven in the hadeeth is better. It is mustahabb to give the greeting in the manner prescribed, but not doing what is mustahabb is not necessarily makrooh, rather it is contrary to what is best. If the one who is enjoined to initiate the greeting fails to do so, and the other one initiates it, then the one who was enjoined has failed to do something mustahabb and the other one has done something that is Sunnah unless he hastened to do it, in which case he has also failed to do something that is mustahabb. End quote from Fath al-Baari, 11/17
The phrase “unless he hastened to do it, in which case he has also failed to do something that is mustahabb” means that the one who is in the house, for example, should not hasten to say salaams to one who is coming in, rather he should give him time to say the salaam, then if he does not do so, the one who is in the house should greet him with salaam.
Conclusion: If you say salaam to the one who enters upon you but does not say salaam, this is not a bid’ah or a sin, rather it is reviving the Sunnah and spreading love, so long as you do not hasten to do that, rather you should give the one who is coming in time to greet you with salaam, then if he does not do that, you should say the salaam in that case.
And Allaah knows best.