During prayers, one must not say salām [the Islamic greeting] to another person; and if someone says salām to him, he must but in the same way as the person said salām to him; i.e. he must not add anything to the initial salām. For example, he must not ‘salāmun ʿalaykum wa raḥmatul lāhi wa barakātuh’ [‘peace be upon you, and Allah’s mercy and His blessing (be upon you too)’].
In fact, based on obligatory precaution, he must not say the words ‘ʿalaykum’ [‘upon you’ (plural form)] or ‘ʿalayk’ [‘upon you’ (singular form)] before the word ‘salām’ if the person who said salām did not say it in that way either. And the recommended precaution is that one’s should be exactly the same as the salām said by the other person. For example, if he said ‘salāmun ʿalaykum’, he should ‘salāmun ʿalaykum’; and if he said ‘salāmun ʿalayk’, he should ‘salāmun ʿalayk’.
However, in to ‘ʿalaykum salām’, he can say ‘ʿalaykum salām’, or ‘assalāmu ʿalaykum’, or ‘salāmun ʿalaykum’.