Solve for x, where x represents the cost of the cap:
x + 3x = $22.52
4x = $22.52
x = $22.52/4
x = $5.63
Test it. If a cap costs $5.63 and a shirt costs 3x that of the cap, the shirt costs $16.89.
The cost of a cap and a shirt is equal to $5.63 + $16.89 = $22.52