Yes, your answers are correct, and Damian gave you the correct information. For number 5 it's 'the' because the University of Nigeria is a specific place, and not necessarily that it is known to both of you. It would be possible to say, for instance, 'I have a library card from a university in Nigeria', but here you are not specifying which university. In number 9, too, it is 'the' because it is a specified reference. You could, in fact, strictly speaking, have had 'a' for number 1 (I went to a library) - that is grammatically correct. But here, the context more or less suggests that it is a student context, so probably the university library (ie a specific place) is meant.