The bellboy realizes that $5 is difficult to split among three people, so he pockets $2 and then gives $1 to each of the three people.

So now each person has paid $9 (the original $10 minus the $1 that was returned). That means they've paid a total of $27, plus the $2 for the tip, is $29. Where's the extra dollar?