Translation:I have read every book in the library.
I can think of two meanings here: "I have read all the books from the library", or "While I was at the library I have read all the books". In english the former came immediately to my mind, as the most natural. In german I still does not have such fast responses; could the sentence also carry the latter meaning?
"In wem?" as a question doesn't make sense here, unless you were inside someone else's body ;) You use "Wo?" to ask for "in der Bibliothek". But anyway, dative is correct. Some more infos on prepositional phrases: http://esl.fis.edu/learners/fis/german/kasus/germanPreps.htm
"In wem?" as a question doesn't make sense here, unless you were inside someone else's body ;)
I think that this is not intended to be a plausible situation, but rather a quick way of demonstrating the appropriate case. As this explanation puts it:
... it helps in that it is much easier determining the case on basis of the interrogative particle "wem" than on the basis of all kinds of pronouns, which are much more diverse.