I have to wonder what would happen if everyone in the world did what I was doing would it begin to contradict itself. If everyone in the world was to steal a book when no one is looking, then there would be no point in selling books in the first place since no one in the world is willing to make a purchase. The book tells us that for Kant, this result is enough to show that the intended action is immoral and irrational. On the other hand, if a certain scenario was to not contradict from generalization, you would then ask yourself if you are willing to live in a world where everyone did that particular act.
For example, I see someone who is in dire need of help. The cost of helping this person is little to none, but I still find myself unwilling to help him. First, lets generalize that situation. Imagine a world where everyone was unwilling to lend a hand when someone was in a situation of extreme need. That kind of world is actually imaginable, and it doesnt contradict itself in anyway. However, when I ask the question, Would I want to live in a world like that? the answer will always be no. That would be a horrifying world to live in.
I could be dying and in need for someone to call the ambulance and no one would stop and help. Therefore, through Kants way of reasoning and thinking, this action is also immoral. Utilitarianism focuses around making the majority happy. As a strong believer in utilitarianism, Kant introduced the imperative predicament which in short required an individual to act the way he or she would want everyone else in the world to act. Stealing a book is not something an individual would want everyone in the world to do. Which is why Kant would believe that it is immoral.