Say SH is the shirt cost and SW is the sweater cost:
SW + 3SH = 42
3SW+2SH = 56
Solve the first for SW:
SW = 42-3SH
Plug that into the second:
3(42-3SH) +2SH = 56
Simplify:
126 - 9SH +2SH = 56
70 = 7SH
SH = 10
Plug this back into the SW formula:
SW = 42 - 3SH = 42 - 3*10 = 12
Shirts cost $10, sweaters cost $12.