When you receive money from someone at the end of Ramadan. What does the correct procedure to return the favor and show gratitud?
There is no "one correct procedure" but by doing an action that would make Muslims gratitude and thankful is a procedure of returning the favor which, according to your description in your question body, is what you want to achieve.
And there is nothing more pleasing than spending money on those in need.
Why I recommend this specific doing is because in Islam it is known as "Sadaqah", which Qur'an and Sunnah have mentioned many times in many different ways to enlighten its importance and benefits for Muslims and Muslim societies as a whole.
Muslims who do Sadaqah are to be rewarded in the present life and in the afterward. But this is applied for Muslims only, and unless you die as a Muslim (since you've stated, in a comment, that you are non-Muslim), you will not be rewarded for that.
[...] And whoever denies the faith - his work has become worthless, and he, in the Hereafter, will be among the losers.
Some of the verses where the Sadaqah has been mentioned:
1- O you who have believed, spend from that which We have provided for you before there comes a Day in which there is no exchange and no friendship and no intercession. And the disbelievers - they are the wrongdoers.
2- The example of those who spend their wealth in the way of Allah is like a seed [of grain] which grows seven spikes; in each spike is a hundred grains. And Allah multiplies [His reward] for whom He wills. And Allah is all-Encompassing and Knowing.
3- Those who spend their wealth in the way of Allah and then do not follow up what they have spent with reminders [of it] or [other] injury will have their reward with their Lord, and there will be no fear concerning them, nor will they grieve.
Some of Ahadith where the Sadaqah has been mentioned:
The Prophet (Peace Be Upon Him) said:
1- Whoever gives charity equal to a date from good (halal) earnings – for Allaah does not accept anything but that which is good – Allaah will take it in His right hand and tend it for the one who gave it as any one of you tends his foal, until it becomes like a mountain.
Narrated by al-Bukhaari, 1344; Muslim, 1014.
2- There is no day on which the people get up but two angels come down and one of them says, ‘O Allaah, give in compensation to the one who spends (in charity),’ and the other says, ‘O Allaah, destroy the one who withholds.’
Narrated by al-Bukhaari, 1374; Muslim, 1010.
3- Allaah said: ‘Spend, O son of Adam, and I shall spend on you.’
Narrated by al-Bukhaari, 5073; Muslim, 993.