I travel from home to university which is 40 KM and then travels back to home. So my total travel is 80KM. is it allowed for me to leave the fast? if yes when I can complete them?
Yes, it is permissible for you to leave fast, however, based on modern technology, you would be driving in a car, so that would not make you tiresome, however, if you are taking a long walk, then it would make it permissible for you to leave your fast. As such, a person on a journey is given the concession that he or she does not need to fast in Ramadan, but he or she must compensate for it by fasting the same number of days he or she did not fast during his or her travel.
[Fasting for] a limited number of days. So whoever among you is ill or on a journey [during them] - then an equal number of other days [are to be made up]. And upon those who are able [to fast, but with hardship] - a ransom [as substitute] of feeding a poor person [each day]. And whoever volunteers good [i.e., excess] - it is better for him. But to fast is best for you, if you only knew.
Narrated by Aisha:
(The wife of the Prophet) Hamza bin `Amr Al-Aslami asked the Prophet, "Should I fast while travelling?" The Prophet (ﷺ) replied, "You may fast if you wish, and you may not fast if you wish."
-Sahih al-Bukhari 1943
Narrated by Ibn Abbas:
Allah's Messenger (ﷺ) set out for Mecca in Ramadan and he fasted, and when he reached Al-Kadid, he broke his fast and the people (with him) broke their fast too. (Abu `Abdullah said, "Al-Kadid is a land covered with water between Usfan and Qudaid.")
-Sahih al-Bukhari 1944