Although there is something wrong with the question, because two jackets could not cost more than two jackets plus other items, it is possible to come up with solutions.
Let H=cost of hat, T=cost of T-shirt, and J=cost of jacket, we can write two equations:
3H+2S+J=140,
2H+2S+2J=170,
assuming the first two statements are correct.
If we subtract the first equation from the second we get:
-H+J=30, so H=J-30, that is, the hat is $30 cheaper than the jacket.
Substitute for H in the second equation:
2(J-30)+2S+2J=170,
2J-60+2S+2J=170,
4J+2S=230, which simplifies to 2J+S=115, and S=115-2J.
So we now have S and H in terms of J.
We know that all costs are positive so 115-2J>0, 115>2J, $57.50>J, that is, the jacket costs no more than $57, if we assume whole dollars. This gives a starting point for the table.
If we assume that a T-shirt costs less than a hat, which costs less than a jacket, we can write the following table:
S is less than H is less than J, cost of two jackets
1 27 57 114
3 26 56 112
5 25 55 110
7 24 54 108
9 23 53 106
11 22 52 104
13 21 51 102
15 20 50 100
17 19 49 98
using the formulas: H=J-30 and S=115-2J. All these costs fit the first two equations. My guess is that two $54 jackets cost $108 not $180, in which case, the T-shirt costs $7 and the hat $24.