I think I understand part A (I got 445 as an answer) but I'm not quite sure how to start off part B.
For part B would it be a sum of the places you can put each book? What I mean to say is, to go along with the hint the book provides, to do 4+1-1 choose 1-1 to place first book, then 5+1-1 choose 1-1 to place second, so on, until book twelve, since as you go on, each time there is one more place you can put the next book