The World Federation One Stop Fiqh

Ruling 1124

One must immediately reply to salām, irrespective of whether he is performing prayers or not. If a person intentionally or due to forgetfulness delays his reply to salām to the extent that were he to reply to it, it would not be considered a reply to that initial salām, then, in the event that he is performing prayers he must not reply, and if he is not performing prayers then replying is not obligatory.