Let vendor have ‘p’ number of pencils & ‘b’ number of ball pens
Given that total number of items is 22
∴ p + b = 22
Pencils are sold for ₹ 15 each & ball pens for ₹ 20 each
total sale amount = 15 x p + 20 x b
= 15p + 20b which is given to be 380.
∴ 15p + 20b = 380
Dividing by 5 throughout,
15p/5 + 20b/5 = 380/5
⇒ 3p + 4b = 76
Multiplying equation (1) by 3 we get
3 x 7 + 3 x b = 22 x 3
⇒ 3p + 3b = 66
Equation (2) – (3) gives
∴ b = 10
∴ p = 12
He sold 12 pencils