John bought 7 rulers and 12 magnets with 1/3 of his savings. The
cost of a magnet is 3 times the cost of a ruler. He used 2/3 of his
remaining allowance to buy more rulers. Hence, how many rulers did
he buy altogether?
Let the cost of one ruler be: x
Therefore cost of 1 magnet is: 3x
Let his saving be: S
Now:
7x+12(3x)=S/3
7x+36x=S/3
43x=S/3
x=S/129
S=129x
Now we have to find the number of rulers purchased by him in 2S/9
2/9S=2/9*129x
2/9S≈$28.67x
Hence John bought 28 rulers.