It is obligatory for a person who is performing prayers to to a salām with the intention of greeting (taḥiyyah), and there is no problem if he also makes an intention of a duʿāʾ, i.e. he asks Allah the Exalted to grant good health to the person who said salām to him.