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.

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
☺☺☺☺

To determine the price of the pencils, we need to set up and solve a system of equations based on the given information.

Let's assume the price of the cheap pencils is x sh and the price of the expensive pencils is (x + 40) sh.

Given that James has 1800 sh, we can write the equation:
x + (x + 40) = 1800

Simplifying the equation, we get:
2x + 40 = 1800

Subtracting 40 from both sides:
2x = 1760

Dividing both sides by 2:
x = 880

Therefore, the price of the cheap pencils is 880 sh and the price of the expensive pencils is (880 + 40) = 920 sh.

Additionally, we are given that if James buys cheap pencils, he gets 12 more. Hence, the quantities of pencils he can buy are:
Cheap pencils: (1800 / 880) = 2
Expensive pencils: (1800 / 920) = 1.95 (approximately)

Since James cannot buy a fraction of a pencil, he will be able to buy 2 cheap pencils and 1 expensive pencil.