A toddler is recommended by a doctor to consume at least grams of calcium and grams of iron. A capsule contains grams of calcium and grams of iron, while a tablet contains grams of calcium and grams of iron.
If the price of a capsule is and the price of a tablet is , the minimum cost that must be spent to meet the needs of the toddler is ....