All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Both of you have done well for intending to return to your friend what have taken unjustly from him, but you do not have to inform him of the matter. It is enough to return the money to him, even in an indirect way, such as putting it in his bank account, or placing it in his office in an envelope indicating that this is his money, and so forth.
Shaykh Ibn 'Uthaymeen said: “It is obligatory for someone who owes rights to people, if he repents to Allah, to return those rights to them. If a person steals something from another person and then repents to Allah, then he has to return what he stole to its owner, otherwise his repentance is not valid.
Someone might say: ‘There is a problem, if I return the right to its owner, I will be divulged, and the person may claim that I had stolen from him more than that.’ The answer is: He may use a trick in this case. He may, for instance, write a letter and not mention his name, and send what he stole, or send its price if the he cannot send the very item. In the letter, he can say (something like): ‘This is your right sent by a person who had taken it unlawfully, and who had repented to Allah; whoever fears Allah, then Allah will make a way out for him’.” [End of quote]
For more benefit, please refer to Fatwa 388129, 131335, 89762, 268510, and 297103.
Allah knows best.