It is Wajib
to take Ghusl after having a wet dream. The Prophet (peace be upon him) was asked about the ruling on a woman having such a dream, he (peace be upon him) said, "She must take Ghusl." (Agreed upon by Al-Bukhari and Muslim) This Hadith indicates that if a Muslim, male or female, has a wet dream during which Maniy (sperm/vaginal secretions that are released on orgasm) is emitted, it becomes Wajib to perform Ghusl. The Prophet (peace be upon him) said in another narration related by
Yes, if she notices a discharge.
This means if she notices Maniy upon awakening. He (peace be upon him) also said:
Taking Ghusl is (obligatory) upon seminal discharge.
Therefore, if one performs Salah without taking Ghusl after nocturnal emission of semen, it is Wajib on them to make up for any Salah they offered while not being in a state of Taharah (ritual purity). However, the young man in question (Part No. 5; Page No. 150) does not have to make up for his Salah, as he was unaware of the ruling and it would be difficult for him to make up for missed Salah during that five year period.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.