## Problem Description and Formulation

The problem is a linear programming optimization problem. We need to maximize the earnings from investments in the milk and cheese industries, given certain constraints.

Let's denote:
- \(M\) as the amount of money invested in the milk industry.
- \(C\) as the amount of money invested in the cheese industry.

The objective is to maximize the total earnings, which can be represented as \(0.08M + 0.06C\), given that:
1. The total investment is limited to $30,000: \(M + C \leq 30000\).
2. The investment in the milk industry must be at least three times the investment in the cheese industry: \(M \geq 3C\).
3. The investment in the milk industry is at most $25,000: \(M \leq 25000\).
4. Non-negativity constraints: \(M \geq 0, C \geq 0\).

## Conversion to Gurobi Code

We will use the Gurobi Python API to model and solve this problem.

```python
import gurobi

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

    # Define variables
    M = model.addVar(lb=0, name="Milk_Investment")
    C = model.addVar(lb=0, name="Cheese_Investment")

    # Objective: Maximize earnings
    model.setObjective(0.08 * M + 0.06 * C, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(M + C <= 30000, name="Total_Investment")
    model.addConstr(M >= 3 * C, name="Milk_Cheese_Ratio")
    model.addConstr(M <= 25000, name="Milk_Investment_Limit")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal investment in milk industry: ${M.varValue}")
        print(f"Optimal investment in cheese industry: ${C.varValue}")
        print(f"Maximized earnings: ${0.08 * M.varValue + 0.06 * C.varValue}")
    else:
        print("The problem is infeasible.")

solve_investment_problem()
```