Let us assume the cost of each t-shirt = x
Let us assume the cost of each pair of pants = y
Then
8x + 5y = 220
and
5x + y = 112
y = 112 - 5x
Putting the value of "y" from the second equation in the first equation, we get
8x + 5y = 220
8x + 5(112 - 5x) = 220
8x + 560 - 25x = 220
560 - 17x = 220
17x = 340
x = 20
Putting the value of "x" in the second equation, we get
y = 112 - 5x
= 112 - 5(20)
= 112 - 100
= 12
From the above deduction, we can conclude that each t-shirt costs $12 and each pair of pants cost $20.