Asalaamu Alaikum,
Praying for mercy for a non-Muslim
Nawawi (Allah have mercy on him) stated in his al-Adhkar that… it is permitted to pray for guidance for non-Muslims, good health well-being, and the like, because of the hadith of Anas (Allah be pleased with him) that, “The Prophet (Allah bless him & give him peace) asked for water and a Jew gave him some, so the Prophet (Allah bless him & give him peace) said to him, ‘May Allah make you beautiful,’ so the man did not see gray hair till he died.”
As for after their death, it is impermissible (haram) to make dua for forgiveness and the like for a non-Muslim, for Allah Most High said, “It is not for the Prophet and those who believe to pray for the forgiveness of unbelievers even though they may be near of kin after it has become clear that they are people of hell-fire.” [Qur’an, 9: 113]
There are many hadiths that mention this, and there is scholarly consensus (ijma`) on this matter.” [al-Mawsu`a al-Fiqhiyya, Kuwait]
As for making dua that Allah give them that which is best for them, or that which they deserve, even after death, while consigning their affairs to Allah, there is nothing wrong with this.
So one can pray to Allah that a deceased non Muslim gets what is best for him and what they deserve as ONLY Allah the almighty knows what is best for every soul. One should also pray to Allah to guide non Muslims to Islam so that they may gain salvation.
And Allah knows best in all matters