My guess is your problem is that the second time he doesn't wait for the bookname?
That's because to set the quantity you use input.NextInt();
Scanner.nextInt() doesn't go to the nextLine, so the next value you get is just that.
To solve it you must consume the nextLine before using the scanner again.
It's good to be able to use someting, it's better to understand how it works.