Can You Give Salam to Someone Who Is Praying?
Question

Is it permissible for a Muslim to give Salams to a Muslim when he is praying or he is making Dhikr or Du`a?
Praise be to Allah.Can you give Salam to someone who is praying?
It is prescribed for a Muslim to initiate the greeting of Salam to his Muslim brother when he is praying , but the one who is praying should not return the Salams whilst praying, except by making a gesture in a manner that will maintain the validity of his prayer.
It was narrated that Ibn `Umar (may Allah be pleased with him) said: “I asked Bilal, How did the Messenger of Allah (peace and blessings of Allah be upon him) return their Salam when they greeted him whilst he was praying? He said, With a gesture of his hand.” (Narrated by Ahmad, 6/12; Abu Dawud, 1/569, no. 927; At-Tirmidhi, 2/204, no. 368; Al-Bayhaqi, 2/262; also narrated by the five)
 It was also narrated from him that Suhayb (may Allah be pleased with him) said: “I passed by the Messenger of Allah (peace and blessings of Allah be upon him) whilst he was praying. I greeted him with Salam and he responded with a gesture .” And he said: I am not sure whether he said “a gesture with his fingers.” (Narrated by the five, apart from Ibn Majah. At-Tirmidhi said: both hadiths are sahih (authentic) in my view).
 It was reported that Umm Salamah (may Allah be pleased with her) said: I heard the Prophet (peace and blessings of Allah be upon him) forbidding us to pray two Rak`ahs after `Asr, then I saw him praying them when he prayed `Asr. She said, he entered and there were some women from Bani Haram, from among the Ansar, with me. He started to pray them [these two Rak`ahs after `Asr], so I sent a young girl to him, and I told her, `Stand beside him and say to him, Umm Salamah is saying to you, O Messenger of Allah, I heard you forbidding us to do these two Rak`ahs and now I see you praying them. If he makes a gesture with his hand then leave him and go back.’ So the young girl did that and he made a gesture with his hand, so she left him and went back. When he finished praying, he said: `O daughter of Abu Umayyah, you asked about the two Rak`ahs after `Asr. Some people from Banu `Abd Al-Qays came to me and kept me from doing the two Rak`ahs after Dhuhr, and that is what these were.’” (Narrated by Al-Bukhari and Muslim)
 These hadiths indicate that it is prescribed to say Salams to a person whilst he is praying, and that he should respond to the greeting with a gesture , because the Prophet (peace and blessings of Allah be upon him) approved of initiating the Salam, and he returned the greeting with a gesture only.
Can you give Salam to someone who is making Dhikr and Du`a?
It is prescribed for the Muslim to initiate the greeting to one who is engaged in making Dhikr or Du`a. It was reported that Abu Waqid Al-Laythi (may Allah be pleased with him) said: “Whilst the Prophet (peace and blessings of Allah be upon him) was sitting in the mosque and there were some people with him, three people came in. Two of them came to the Messenger of Allah (peace and blessings of Allah be upon him) and one went away. When they came up to the Messenger of Allah (peace and blessings of Allah be upon him), they greeted him with Salam. One of them found a space in the circle and sat down, and the other sat down behind him. The third one turned and went away. When the Messenger (peace and blessings of Allah be upon him) had finished (his talk), he said: `Shall I tell you about these three people? One of them turned to Allah so Allah accepted him; the second felt shy so Allah will feel shy (to punish him); and the third turned away so Allah turned away from him.” (Narrated by Malik in Al-Muwatta’, 2/960; Ahmad, 5/219; Al-Bukhari, 1/24, 122; Muslim, 4/1713, no. 2176; At-Tirmidhi, 5/73, no. 2724; Abu Ya`la, 3/33, no. 1445)
And in As-Sahihayn it is narrated from Abu Hurayrah (may Allah be pleased with him) that a Bedouin entered the mosque and prayed, but he did not do the Ruku` and Sujud properly. Then he came and greeted the Prophet (peace and blessings of Allah be upon him) with Salam . The Prophet (peace and blessings of Allah be upon him) returned his greeting then said, “Go back and pray, for you have not prayed.”
And Allah is the Source of strength. May Allah bless our Prophet Muhammad and his family and Companions, and grant them peace.
And Allah knows best.