Maulana I’ve decided that this year I will inshaallah do my pilgrimage to Mecca. I know that there’s some preparations that I’ll have to settle before the pilgrimage, my question is revolving the khums. I haven’t given any khums before because I lived with my parents and my father took care of it, but now I live on my own so my question is how does it work? What is accounted in the khums?

Also I read that one cannot do the pilgrimage if he/she owe any money to someone. I’ve taken a student loan and a mortgage loan, which I’m currently paying back in form of a monthly payment plan. What is the verdict regarding those loans in this situation?

Khums is wajib on every baligh and according to Aagha e Sistani one who is in debt can not go for wajib if you go it will be consider as mustahab except in the past in any occasion you had potentiality for haj and you had not gone.
There are many question are related your situation either you speak to your local Alim