1- Everyday ask Allah to remove these thoughts from his mind. Don’t underestimate the power of Du’a.
2- Try to find out what’s causing such fantasies. Sometimes a man has certain sexual urges that need to be fulfilled and if they are, the fantasies decrease. Ask him what can you do for him that’s halal.
3- Remind him that this act is a grave sin in Allah’s eyes. It’s one of the worst sins. By being reminded hopefully such thoughts will decrease.
4- Have him recite Ziyara Ashura everyday if possible.
5- Have him say La ilaha illa Allah 100 times a day. It’s very effective.
May Allah help him overcome such thoughts.