it's really quite simple
the two bucks the clerk pocketed are the difference between the $27 they ended up paying and the $25 which was the cost of the room