The logic is wrong. They paid $30, subtract the $2 for the tip and you get $28, not $27. Then the extra $3 is split evenly among them.