If we assume a 100-gram sample of fertilizer, then the 30: 10: 10 percentages become the masses, in grams, of N, \text{P}_2\text{O}_5,\text{ and K}_2\text{O}. These masses may be changed to moles of substance, and then to moles of each element. To get the desired x:y: 1.0 ratio, divide the moles of each element by the moles of potassium.
A 100-gram sampl e of 30:10:10 fertilizer contains 30\text{ g N, 10 g P}_2\text{O}_5,\text{ and 10 g K}_2\text{O}.
This gives a ratio of 2.1413:0.14090:0.21231
The ratio must be divided by the moles of K and rounded.
(2.1413/0.21231):(0.14090/0.21231):(0.21231/0.21231)
10.086: 0.66365: 1.000
10:0.66: 1.0