The man at the front desk charged them thirty dollars for the room, and each man gave $10.
Later on, the front desk guy realized he had overcharged the men by $5, so he sent the bellhop to the men's room with five $1 bills. On the way, the bellhop was trying to figure out how to distribute the $5, and he decided to give each man $1 and keep the last $2 as a tip. So he did so.
So after all was said and done, each man actually paid $9 for the room. $9 + $9 + $9 = $27. Add two for the bellhop's tip and you get $29.
Where's the other dollar?