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, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
The door of repentance is open to Allaah's slaves until the sun rises from the west or until the disobedient person breathes his last breath. We have already explained the conditions of repentance in Fatwa 86527.
You should note that if a person just laughs because someone got lower grades than him without having the intention of mocking that person, it is not considered in itself a sin that requires repentance. Hence, we recommend that you avoid obsessive whispers and seek the forgiveness of Allaah as mentioned in the Hadeeth: “Whoever says Astaghfirullaah Al-'Atheem allathi laa ilaaha illa huwa Al-Hayya Al-Qayyooma wa atoobu ilayh (I seek the forgiveness of Allaah the All-Mighty, Whom there is None worthy of worship except Him, the Living, The Eternal, and I repent unto Him), Allaah will forgive him even if he turned back from battle.” [At-Tirmithi - Al-Albaani graded it Saheeh (sound)]
You may also say the supplication mentioned in the Hadeeth: “Allaahummaghfir lee thanbee kullahu, diqqahu wa jillahu, wa awwalahu wa aakhirahu wa ‘alaaniyatahu wa sirrah (O Allaah, forgive me all my sins, great and small, the first and the last, those that are apparent and those that are hidden.” [Muslim]
Allaah Knows best.