Consider a store that sells three types of items: shirts, hats, and pants. Each shirt costs $20, each hat costs $15, and each pair of pants costs $40.
A customer buys a total of 5 items for a total cost of $140. If the customer bought 2 shirts, how many hats and pairs of pants did they buy?