## Problem Description and Formulation

Kevin needs to supplement his diet with vitamins A and B. He requires at least 25 units of vitamin A and 40 units of vitamin B every day. He can buy two types of capsules: Special Formula and One Daily. Each capsule of Special Formula contains 4 units of vitamin A and 5 units of vitamin B, while each capsule of One Daily contains 3 units of vitamin A and 7 units of vitamin B. The cost per Special Formula capsule is $0.50, and the cost per One Daily capsule is $0.20. The goal is to determine how many capsules of each type Kevin should buy to minimize his cost while meeting his vitamin requirements.

## Mathematical Formulation

Let \(x\) be the number of Special Formula capsules and \(y\) be the number of One Daily capsules. The problem can be formulated as follows:

- Objective function: Minimize \(0.50x + 0.20y\)
- Subject to:
  1. \(4x + 3y \geq 25\) (Vitamin A requirement)
  2. \(5x + 7y \geq 40\) (Vitamin B requirement)
  3. \(x \geq 0, y \geq 0\) (Non-negativity constraints, as the number of capsules cannot be negative)

## Gurobi Code

```python
import gurobi

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

    # Define variables
    x = model.addVar(name="Special_Formula", obj=0.50, vtype=gurobi.GRB.CONTINUOUS)
    y = model.addVar(name="One_Daily", obj=0.20, vtype=gurobi.GRB.CONTINUOUS)

    # Add constraints
    model.addConstr(x * 4 + y * 3 >= 25, name="Vitamin_A")
    model.addConstr(x * 5 + y * 7 >= 40, name="Vitamin_B")

    # Set bounds for variables (non-negativity)
    x.lb = 0
    y.lb = 0

    # Solve the model
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal solution: Special Formula = {x.varValue}, One Daily = {y.varValue}")
        print(f"Minimum cost: ${model.objVal:.2f}")
    else:
        print("No optimal solution found.")

# Run the function
solve_vitamin_problem()
```

However, to ensure we're using Gurobi's Python API correctly and to reflect that we are indeed solving a linear programming problem but with integer solutions typically expected for capsule counts, let's adjust our approach slightly to use the `gurobi` environment properly and consider integrality:

```python
import gurobi as grb

def solve_vitamin_problem():
    model = grb.Model()

    x = model.addVar(name="Special_Formula", obj=0.50, vtype=grb.GRB.INTEGER)
    y = model.addVar(name="One_Daily", obj=0.20, vtype=grb.GRB.INTEGER)

    model.addConstr(x * 4 + y * 3 >= 25, name="Vitamin_A")
    model.addConstr(x * 5 + y * 7 >= 40, name="Vitamin_B")

    x.lb = 0
    y.lb = 0

    model.optimize()

    if model.status == grb.GRB.OPTIMAL:
        print(f"Optimal solution: Special Formula = {x.varValue}, One Daily = {y.varValue}")
        print(f"Minimum cost: ${model.objVal:.2f}")
    else:
        print("No optimal solution found.")

solve_vitamin_problem()
```