This is the way I understand it:
1 and 3 are correct, but not 2.
“In the beginning” means “at first”, so you can’t say “In the beginning of the book”, because it’s similar to saying “at first of the book”. Instead you should write "At the beginning of the book".
This is what Cambridge dictionary writes (
http://dictionary.cambridge.org/grammar/british-grammar/at-on-and-in-time ):
At the beginning or in the beginning?
We use at the beginning (often with of) to talk about the point where something starts. We usually use in the beginning when we contrast two situations in time:
“At the beginning of every lesson, the teacher told the children a little story.”
“In the beginning, nobody understood what was happening, but after she explained everything very carefully, things were much clearer.”