For a though, I thought it was just easier to do process by elimination since it would be a reasonably small number for both. We know 15A + 17B = 143, where A is the number of shirts and B is the number of shorts bought.
Rearranging for A: (143-17B)/15 = A
By process of elimination, the result...