Haha, its really much simpler than that
It took me a good while to figure it out, just to discover how easy it is
They each paid $9, which sums to $27, that $27 already includes the $2 tips, so you need not add it again
Hope I made it clear enough, cause all these numbers make it so...