## Problem Description and Formulation

The pharmacist needs to mix two drugs, A and B, to create a mixture that contains at least 5 units of pain killer and 12 units of fever reliever. The amounts of pain killer and fever reliever in each drug are given as follows:

- Drug A: 3 units/mg of pain killer, 2.5 units/mg of fever reliever
- Drug B: 2 units/mg of pain killer, 3.5 units/mg of fever reliever

The costs of the drugs are:

- Drug A: $0.50 per mg
- Drug B: $0.30 per mg

The goal is to minimize the cost of the mixture while meeting the requirements for pain killer and fever reliever.

## Mathematical Formulation

Let \(x\) be the amount of drug A in mg and \(y\) be the amount of drug B in mg. The problem can be formulated as a linear programming problem:

### Objective Function

Minimize the total cost: \(0.50x + 0.30y\)

### Constraints

1. Pain killer constraint: \(3x + 2y \geq 5\)
2. Fever reliever constraint: \(2.5x + 3.5y \geq 12\)
3. Non-negativity constraints: \(x \geq 0, y \geq 0\)

## Gurobi Code

```python
import gurobi

def solve_mixture_problem():
    # Create a new model
    model = gurobi.Model()

    # Define variables
    x = model.addVar(name="drug_A", lb=0, ub=gurobi.GRB.INFINITY)
    y = model.addVar(name="drug_B", lb=0, ub=gurobi.GRB.INFINITY)

    # Objective function: minimize cost
    model.setObjective(0.50 * x + 0.30 * y, gurobi.GRB.MINIMIZE)

    # Constraints
    model.addConstr(3 * x + 2 * y >= 5, name="pain_killer")
    model.addConstr(2.5 * x + 3.5 * y >= 12, name="fever_reliever")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal cost: ", model.objVal)
        print("Amount of drug A: ", x.varValue)
        print("Amount of drug B: ", y.varValue)
    else:
        print("The problem is infeasible")

solve_mixture_problem()
```