Halo teman! Both translations could be accepted. The use of the enclitic "-nya" in "bukunya" can mean "the book / the books", but also "her / his / their / book/s".
Selamat belajar! :)
I have the same question asked by RobertEddy: Is the phrase "to throw the book at (somebody)" used only literally in Indonesian, or can it be used as an idiom the way it is used in English to describe a harsh punishment or maximum penalty dealt to someone for wrong-doing?