## Problem Description and Formulation

Amanda has 4000 acres of land to grow apple and peach trees. The goal is to maximize profit given the constraints on budget and maintenance hours.

### Variables
- Let \(x\) be the number of acres for apple trees.
- Let \(y\) be the number of acres for peach trees.

### Objective Function
The profit per acre of apples is $15, and the profit per acre of peaches is $25. The objective function to maximize profit (\(P\)) is:
\[ P = 15x + 25y \]

### Constraints
1. **Land Constraint**: Amanda has 4000 acres of land.
\[ x + y \leq 4000 \]

2. **Budget Constraint**: Apple trees cost $50 for their saplings, and peach trees cost $80. Amanda has a budget of $30,000.
\[ 50x + 80y \leq 30000 \]

3. **Maintenance Hours Constraint**: Apple trees take 3 hours to maintain per acre, and peach trees take 5 hours. Amanda has 600 available hours for maintenance.
\[ 3x + 5y \leq 600 \]

4. **Non-Negativity Constraints**: The number of acres cannot be negative.
\[ x \geq 0, y \geq 0 \]

## Gurobi Code

To solve this linear programming problem using Gurobi in Python, we can use the following code:

```python
import gurobi

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

    # Define variables
    x = model.addVar(lb=0, name="apple_acres")
    y = model.addVar(lb=0, name="peach_acres")

    # Objective function: Maximize profit
    model.setObjective(15 * x + 25 * y, gurobi.GRB.MAXIMIZE)

    # Land constraint
    model.addConstr(x + y <= 4000, name="land_constraint")

    # Budget constraint
    model.addConstr(50 * x + 80 * y <= 30000, name="budget_constraint")

    # Maintenance hours constraint
    model.addConstr(3 * x + 5 * y <= 600, name="maintenance_constraint")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal acres for apple trees: {x.varValue}")
        print(f"Optimal acres for peach trees: {y.varValue}")
        print(f"Maximal profit: {model.objVal}")
    else:
        print("The problem is infeasible")

solve_optimization_problem()
```

This code defines the optimization problem as described, sets up the model with Gurobi, and solves it to find the optimal number of acres for apple and peach trees that maximizes profit under the given constraints.