A compound contains only potassium and iodine. A sample weighing 12.3 g of this compound contained 2.90 g of potassium. How many grams of iodine would there be in another sample of this compound containing 9.56 g of potassium?

Do I find the mol of each (12.3 g, 2.90 g) or am I thinking wrong?