We will solve this by suing simultaneous equations,
⇒ 5s + 3j = 87
4s + 2j = 64
Multiply the first equation with 4 and the second one with 5, this is to get one of the values equal so that we can cancel them out,
⇒ (5s + 3j = 87) × 4
(4s + 2j = 64) × 5
∴ ⇒ 20s + 12j = 348
20s + 10j = 320
Subtract both the equations. This is how your result (after subtraction) should look like,
⇒ 2j = 28
∴ ⇒ j = $14
Now replace the value of 'j' in one of the original equations,
⇒ 4s + 2(14) = 64
⇒ 4s + 28 = 64
⇒ 4s = 64 - 28
⇒ 4s = 36
∴ ⇒ s = $9
Therefore, one pair of jeans cost $14 and a shirt costs $9
Hope you understood! Feel free to ask me if you didn't understand a step.