All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Whoever owes money to someone else has to do the following:
1. He must write a will so that the right of the other person would not be lost. The Prophet, sallallaahu ‘alayhi wa sallam , said: "A Muslim who has something to make a will about should not stay two nights without writing his will." [Al-Bukhari and Muslim]
2. He should endeavor to look for him or for his heirs in order to give them back his right.
3. If after looking for him it is not possible to find him, then he can give what he owes him in charity with the intention that the reward goes to the creditor.
Also, if at a given time the person to whom one owes money returns, then the owner has the choice of two things:
1) To accept the charity that was given on his behalf and its reward will be for him,
or:
2) To take back his money, in which case, the money that was given in charity on his behalf would be from the debtor who would get its reward.
Allaah Knows best.