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. We ask Allaah to exalt his mention as well as that of his family and all his companions.
If the initiative of repaying this loan before its due time will lead to getting rid of the interests or reducing them, then your friend is obliged to earnestly endeavour to do so. Allaah Says (what means): {…and give up what remains [due to you] of interest.}[Quran 2:278]. This also includes avoiding any unnecessary expenses if this does not cause him any hardship so that he may take the initiative to repay the debts.
In this case, it is forbidden for you to help him in things which may cause the delay of repaying this debt, like buying something which he really does not need, or accepting a gift from him, as Allaah Says (what means): {…but do not cooperate in sin and aggression.}[Quran 5:2].
Therefore, you should repent to Allaah and endeavour to recompense him for that gift by paying him a value what is equal to it, or more than what it costs according to your ability.
However, if taking the initiative to repay the debts does not lead to getting rid of the interests which he is obliged to repay or reducing them, then it is not an obligation to take the initiative to repay. In this case, it is enough for him to repent to Allaah and you are not sinful for buying that thing or offering or accepting a gift.
For more benefit, please refer to Fataawa 81364 and 82764.
Allaah Knows best.