Answer:
Let's set up a system of equations to solve for S and L:
S + L = 24 (they sold a total of 24 shirts)
14S + 17L = 378 (the total amount made from selling the shirts was $378)
We can solve for one variable in the first equation and substitute it into the second equation:
S = 24 - L
14(24 - L) + 17L = 378
336 - 14L + 17L = 378
3L = 42
L = 14
So they sold 14 long sleeve shirts. We can substitute this value back into the first equation to solve for S:
S + 14 = 24
S = 10
Therefore, they sold 10 short sleeve shirts and 14 long sleeve shirts.