Apparently, the mentioned place is a place of residence as long as you live in it during the years of study. If this is the case, then when you pass by it during the holidays then you pray full and fast.
If one pays khums every week from his weekly salary, then he does not have to pay khums at end of the khums year. If he did not do so, as he is permitted to delay the payment of khums until the end of the khums year, then he can pay the khums from the remainder of his earnings after the payment of the yearly expenses.
History books mentioned that the prophet (Peace be upon him and his progeny) was poisoned by a Jewish woman in the city of khaiber. His health was restored afterwards but the same illness returned and resulted to his death.
Allah knows best.