الإجابة
All praise be to Allah and may His blessings and peace be on His last messenger, Muhammad,
Allah said,
"وَإِذَا حُيِّيتُم بِتَحِيَّةٍ فَحَيُّوا بِأَحْسَنَ مِنْهَا أَوْ رُدُّوهَا إِنَّ اللَّهَ كَانَ عَلَىٰ كُلِّ شَيْءٍ حَسِيبًا."
“And when you are greeted with a greeting, greet [in return] with one better than it or [at least] return it [in a like manner]. Indeed, Allah is ever, over all things, an Accountant.” [Sahih International 4:86]
It is mandatory to reply to the greeting of “assalaam” if the person is individually addressed by it. If a group is addressed by it, and some of them replied, it is only preferred for the rest to reply, not mandatory, since it is their collective obligation to reply, and when some of them do, the rest are not obliged to reply. Allah knows best.