Explanation:
100% = $27.50
1% = 100%/100 = $27.50/100 = $0.275
the extra amount paid (for the tip) was
$32.45 - $27.50 = $4.95
to know how many percent that is, we need to see how often 1% fits into that amount.
so,
4.95 / 0.275 = 18
therefore the tip was 18%.
FYI - in real life the tip percentage (and corresponding amount) is calculated based on the net bill (the amount before sales tax).