To solve this optimization problem, we need to define the decision variables and the objective function. Let's denote:

- $x_s$ as the number of pounds of sweet mix to be made.
- $x_r$ as the number of pounds of regular mix to be made.

The objective is to maximize profit. Given that the sweet mix sells for $3 a pound and the regular mix sells for $2 a pound, the total revenue (and thus profit, since there are no costs mentioned in the problem) can be represented by the equation:

\[ \text{Profit} = 3x_s + 2x_r \]

However, we must also consider the constraints based on the availability of caramel and butter popcorn and their proportions in each mix.

- The sweet mix has 75% caramel popcorn and 25% butter popcorn.
- The regular mix has 50% caramel popcorn and 50% butter popcorn.

Given that there are 30 pounds of butter popcorn and 40 pounds of caramel popcorn, we can set up the following constraints:

1. For caramel popcorn: \(0.75x_s + 0.5x_r \leq 40\)
2. For butter popcorn: \(0.25x_s + 0.5x_r \leq 30\)

Additionally, $x_s$ and $x_r$ must be non-negative since they represent quantities of mixes to be made.

To solve this linear programming problem using Gurobi in Python, we first need to import the necessary libraries, define our variables, and then set up the model with its objective function and constraints.

```python
from gurobipy import *

# Create a new model
m = Model("popcorn_optimization")

# Define the decision variables
x_s = m.addVar(name="sweet_mix", lb=0)
x_r = m.addVar(name="regular_mix", lb=0)

# Set the objective function to maximize profit
m.setObjective(3*x_s + 2*x_r, GRB.MAXIMIZE)

# Add constraints based on caramel and butter popcorn availability
m.addConstr(0.75*x_s + 0.5*x_r <= 40, name="caramel_constraint")
m.addConstr(0.25*x_s + 0.5*x_r <= 30, name="butter_constraint")

# Optimize the model
m.optimize()

# Print out the results if an optimal solution is found
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Sweet mix: {x_s.x} pounds")
    print(f"Regular mix: {x_r.x} pounds")
    print(f"Maximum profit: ${m.objVal}")
else:
    print("No optimal solution found.")
```