The verb to book, as in to process a criminal suspect in custody is unrelated. That refers to processing after initial arrest, or even by extension the arrest itself (which is what McGarrett was telling Dano to do). Throwing the book comes in at the other end of the criminal process, at sentencing after the trial. The verb goes back to the 18th century.
I probably should have addressed them together though. Others will have the same thought.