Praise be to Allah.Praise be to Allaah.
We praise Allaah for guiding you to repent, and to keep away from these bad friends. You have to keep on thanking Allaah and asking Him to make you steadfast and to guide you.
The rights of other people must be restored if the wrong done involved material things. With regard to intangible things, such as gossip, the correct view – and Allaah knows best – is that he does not have to tell him if the person does not know about that, so it is sufficient to pray for forgiveness for his sin, and to pray for forgiveness for his brother too, in return for the harm done by his gossiping and backbiting about him.
The harm done to this young man by means of plotting and witchcraft comes under the heading of intangible matters, so you do not have to tell him about what you did; it is sufficient for you to fulfil the conditions of sincere repentance, namely regretting what you did, giving it up, and resolving not to go back to it again, as well as stopping the evildoer and others as much as you can.
See also the answer to question no. 6308.
But if that young man or anyone else knows about the plots and tricks you used against him, then you have to apologize to him and ask for his forgiveness, because you are only allowed not to tell him if he did not know so that he will not be upset by that, and lest that lead to cutting off ties and the stirring up of enmity and hatred between you. But if he knows that you did this evil thing, then the reason not to tell him is no longer applicable and your apologizing to him will serve a purpose.
We ask Allaah to accept your repentance. And Allaah knows best.