Praise be to Allah.
The most correct scholarly view is that it is obligatory to do Hajj straightaway, and it is not permissible to delay it without a legitimate shar’i excuse, because you do not know what will happen to you. You may delay Hajj this year and then die, and Hajj will remain a debt that you owe. But if doing Hajj will affect your performance in the exams, then you may delay it until next year. But I suggest taking your study materials with you and going for Hajj, if you are going to travel to Hajj early. Or you can delay travelling to Hajj and hasten to leave during the days of stoning the Jamaraat. In this way Hajj will only take a few days and it will not affect your exams in sha Allaah.
If a person is keen, he can do Hajj, and that will not affect him at all. If you put your trust in Allaah and perform Hajj with trust in Him, He will make things easy for you. End quote.
Fataawa Ibn ‘Uthaymeen, 21/63.