It is the responsibility of people upon each other to respect each other's existence and make sure that the other person is safe from any harm that one could cause. However, the world thrives on kindness. Extending favor or acts of service shows generosity and helps build communities based on compassion.
Islam encourages and promotes people to show kindness and help those around them. The best way to return and acknowledge the favor is to be grateful for it and make dua for one who does you a favor. Humility keeps one grateful for all that they have been blessed with. Help through a person’s favor is a sign of Allah's help and kindness to you. As narrated by Abu Hurairah and reported in Sunan Abī Dāwūd 4811, the Messenger of Allah (ﷺ) said that “whoever doesn’t thank people, hasn’t thanked Allah (سُبْحَانَهُ وَتَعَالَى).
The essence of making dua for one who does you a favor is to sincerely thank them and ask Allah’s reward for them. When you make such a prayer, express your gratitude with a genuine and sincere intention. Make sure you are thanking the person alongside making a dua for them.
Making dua for one who does you a favor benefits both the giver and the receiver. When you pray for someone who has favored you, you acknowledge their effort, and this acknowledgment instills in you the feeling that they can't take things for granted.
Praying not only humbles your own heart but it makes you grateful. This gratitude further instills humility and allows one to be kind to others. It makes one conscious of their blessing and how they can foster kinder relationships by sharing it with the people around them.