Ponder this if you will: how did the hotel get full in the first place? if you assume that is possible, then you can reverse the original room assignments, and reassign rooms.
The source of your confusion is that you trusted the problem is even possible to set up, without availing yourself of the power that the setup implies.