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 we have to find the number of rulers purchased by him in 2S/9
Hence John bought 28 rulers.