## Problem Description and Formulation

The popcorn store has 30 pounds of butter popcorn and 40 pounds of caramel popcorn. They sell two mixed bags: a sweet mix and a regular mix. The sweet mix sells for $3 a pound and consists of 75% caramel popcorn and 25% butter popcorn. The regular mix sells for $2 a pound and consists of 50% caramel popcorn and 50% butter popcorn.

Let's denote:
- \(x\) as the number of pounds of sweet mix to be made,
- \(y\) as the number of pounds of regular mix to be made.

The objective is to maximize profit. The profit per pound of sweet mix is $3, and the profit per pound of regular mix is $2.

## Constraints

1. **Butter Popcorn Constraint**: The store has 30 pounds of butter popcorn. Since the sweet mix requires 25% butter popcorn and the regular mix requires 50% butter popcorn, we have:
\[ 0.25x + 0.50y \leq 30 \]

2. **Caramel Popcorn Constraint**: The store has 40 pounds of caramel popcorn. Since the sweet mix requires 75% caramel popcorn and the regular mix requires 50% caramel popcorn, we have:
\[ 0.75x + 0.50y \leq 40 \]

3. **Non-Negativity Constraints**: The number of pounds of each mix cannot be negative:
\[ x \geq 0, y \geq 0 \]

## Objective Function

The total profit \(P\) from selling \(x\) pounds of sweet mix and \(y\) pounds of regular mix is:
\[ P = 3x + 2y \]

The goal is to maximize \(P\) subject to the constraints.

## Gurobi Code

```python
import gurobi

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

    # Define variables
    x = m.addVar(name="Sweet_Mix", lb=0)  # Pounds of sweet mix
    y = m.addVar(name="Regular_Mix", lb=0)  # Pounds of regular mix

    # Objective function: Maximize profit
    m.setObjective(3*x + 2*y, gurobi.GRB.MAXIMIZE)

    # Constraints
    m.addConstr(0.25*x + 0.50*y <= 30, name="Butter_Popcorn_Constraint")
    m.addConstr(0.75*x + 0.50*y <= 40, name="Caramel_Popcorn_Constraint")

    # Optimize
    m.optimize()

    # Print solution
    if m.status == gurobi.GRB.OPTIMAL:
        print("Optimal Solution:")
        print(f"Sweet Mix: {x.varValue} pounds")
        print(f"Regular Mix: {y.varValue} pounds")
        print(f"Max Profit: ${m.objVal:.2f}")
    else:
        print("No optimal solution found.")

solve_popcorn_mix_problem()
```