For tom, find 7% of 22$. 0.07(22)=1.54. 22+1.54=23.54. That is how much Thomas paid for the shirt with tax.
For his cousin, find 7% of 18$. 0.07(18)=1.26. 18+1.26=19.26. That is how much his cousin paid with tax. Since 1.54 is greater than 1.26, Tom paid more tax.