As far as the three guests are concerned, they always pay 27 yuan. Of the 27 yuan, 25 yuan was taken away by the boss, the remaining 2 yuan was stolen by the waiter, and 3 yuan was in their pockets.
What is said in the question is confusing. The waiter took 2 yuan from 5 yuan, not 2 yuan from 30 yuan.