There are a lot of different approaches, here's one of them.
First make an infinite amount of room in the hotel, by moving every person to the room with double their current room number. (n -> 2n. For example the occupant of room 5342 goes to room 10684, or the occupant of room 111 goes to room 222).
This leaves all the (infinitely many) odd numbered rooms empty.
Then we enumerate the people in the buses. I don't want to write down the enumeration procedure yet, 'cause its a bit technical. Just assume, every person trom the buses has got their unique natural number. We may also require, that for every number there is a passenger with this number, if we like.
Now we assign the first passenger to the first odd-numbered room of the hotel, the second passenger to the second odd-numbered room etc. (passenger n goes to room 2n-1)
Then we're done and have filled the whole hotel again.