Let x be the total cost of the jeans
And since the shopkeeper paid $3836 more for the shirts than the jeans, we have
x + x + 3836 = 9380
$2772 = x = total cost of the jeans
2772 + 3836 = $6608 = total cost of shirts
Let y = number of jeans bought
Let p + 40 = price of one pair of jeans
Let 4y = number of shirts bought
Let p = price of each shirt
So we have that the price of a pair of jeans times the number he bought = $2772.. or...
(p + 40)y = 2772
And, solving for y, we have
y = 2772/(p + 40)
And the price of each shirt times the number he bought = $6608...or.....
p(4y) = 6608
And substituting in for y and solving for p, we have
4p[2772/(p + 40)] = 6608 (multiply both sides by p + 40 )
11088p = 6608p + 264320
4480p = 264320
p = $59 = cost of each shirt
p + 40 = $99 = cost of a pair of jeans
Now, to find the number of pairs of jeans bought, we have, the price of each pair times the number purchased = $2772....or......
$99y = $2772 solve for y
y = 28 = number of pairs of jeans bought
And he bought 4 times as many shirts, so... 4y = 4(28) = 112 = number of shirts bought
Verifying our answers
28($99) + 112($59) = $9380 = the total cost
So....$99 for each pair of jeans seems correct....