The price of the two pencils is Rs.100 (expensive) and Rs.60 (cheaper).
Let the price of the expensive pencil be = x
And the price of the cheaper one be = y.
According to the question:
The difference between the price of 2 = 40
Therefore,
x- y =40
Total amount = 1800.
The number of Expensive pencils that can be bought = 1800/x.
The number of Expensive pencils that can be bought = 1800/y.
According to the question,
1800/y -1800/x = 15 (the number of extra pencils)
= (1800x -1800y)/xy = 15
= 1800x -1800y =15xy
= 1800 (x-y) =15xy
Substituting x-y as 40
1800 x 40 =15xy
xy = 4800.
We know that x-y =40
Therefore, x = y+ 40
xy = 4800
(y+40) y = 4800
+ 40 y = 4800
Using the quadratic equation formula,
y = 52.111 or y = -92.111
Thus, the cost of the cheaper pencil (y)= Rs. 52.111
The cost of the expensive pencil (x) = 52.111 + 40 = Rs 92.111
Therefore the cost of two pencils is = Rs. 52.111 and Rs 92.111.