Translation:This is my fifth and last year at the university.
I universitetet would at best be interpreted as being physically inside of the building(s) that is/are the university, but it can't be used with this context. (I guess if you are hired in to do for instance renovations inside it is possible to make a sentence with i universitet)
Jeg er i klasserommet og studerer til en eksamen ved universitetet, mens romkameraten min holder seg på rommet sitt og sluntrer unna.
How about that! I - til - ved - på. Prepositions are the worst subject, even Dutch and German people that otherwise manage to sound Norwegian will mostly be revealed by using the prepositions wrongly.
Yea prepositions have to be the hardest part of learning a new language, some languages are super strict with them while others are super lenient. If i were to guess "i klasserommet" is used because it is a general location, "ved universitetet" is used because you are doing something specific at/by the university, and "til en eksamen" I have no idea and would have to see more examples of "til" used instead of "for"
For rooms, it's either i / på. My best generalisation is
- på goes with the smaller rooms you spend less time in (kitchen, bathroom, toilet), rooms that can also be a workplace (office, library), and room like areas where på can stand in for oppå (on top of) like a balcony, loft, terrace.
- i for storagerooms, hallway, livingroom, larger rooms meant for a lot of people (classrooms, auditorium).
- some rooms can be both, depending on whether you do some work there or if you merely answer the question "where are you"... (i would then specifically mean "inside").
Some prepositions follow a verb rather closely, if you look up studere at my primary online source http://www.nob-ordbok.uio.no/perl/ordbok.cgi?OPP=+Studere&ant_bokmaal=5&ant_nynorsk=5&bokmaal=+&ordbok=bokmaal you will see:
1 utdanne seg ved universitet eller høgskole s- ved Universitetet i Oslo / s- til lege / s- filologi
You study at (ved) the university, you study to (til) be a doctor. Down at point 3 they use the verb in a more lofty way, in the sense of speculation, then it's på. I think studerer på universitet has become quite common nonetheless. But studerer til å bli lege vs studerer på å bli lege... The first means you are studying to become a doctor, the second means you are wondering if maybe you should become a doctor. (I wonder if there are enough examples inside the Duolingo for this? Note to self.)
The verb to read, å lese, has the same help regarding prepositions. Except you are down at point 4 where read = study. You are reading on (på) the bed or the bus (1), but reading for (til) an exam (4).