present tense: I am now going to the library to prepare for my examinations.
Past tense: I went to the library to prepare for my examination.
You can not use 'in' for preparation. you should use prepare instead of preparation and to library isn't very good you should use to the because library is a noun (名詞)