James has 1800sh to buy pencils. There two types of pencils, cheap and expensive The prices differ for 40 sh. If he buys cheap pencils he gets 12 more. What is price of the pencils.

2 answers

If he can buy x expensive pencils that cost p each, then

xp = 1800
(x+12)(p-40) = 1800

so, since x = 1800/p,

(1800/p + 12)(p-40) = 1800

Now just solve for p
Let n be the price of the expensive pencils. Then the price of the cheap pencils is n-40. So:
1800/n=1800/n-40 -12
1800(n-40)=1800n-12(n²-40n)
1800n-72000=1800n-12n²+480n
12n²-480n-72000=0
n²-40n-6000=0
(n-100)(n+60)=0
n=100, -60
☺☺☺☺