$25 is sitting with the Cashier, $2 with the friends, and $3 with the Waiter. That adds to the required $30.
The mistake is expecting that what the friends paid and what the Waiter kept to add up to what the friends initially gave.
In fact, it is the amount that the meal effectively cost them, plus the amount they received back, that should add to $30.