## Problem Description and Formulation

The farmer has 400 acres of land to plant apple and peach trees. The goal is to maximize profit given the following constraints:

1. The farmer must plant at least 60 acres of apple trees.
2. The farmer must plant at least 40 acres of peach trees.
3. The farmer can plant at most 3 times the amount of peach trees as apple trees.
4. The total land used for both trees cannot exceed 400 acres.

Let's denote:
- \(A\) as the acres of apple trees,
- \(P\) as the acres of peach trees.

The objective function to maximize profit is:
\[ \text{Maximize:} \quad 900A + 1100P \]

Subject to:
1. \( A \geq 60 \)
2. \( P \geq 40 \)
3. \( P \leq 3A \)
4. \( A + P \leq 400 \)

## Gurobi Code

```python
import gurobi

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

    # Define the variables
    A = m.addVar(lb=0, name="Apple acres")
    P = m.addVar(lb=0, name="Peach acres")

    # Objective function: Maximize profit
    m.setObjective(900*A + 1100*P, gurobi.GRB.MAXIMIZE)

    # Constraints
    m.addConstr(A >= 60, name="Min Apple acres")
    m.addConstr(P >= 40, name="Min Peach acres")
    m.addConstr(P <= 3*A, name="Peach vs Apple ratio")
    m.addConstr(A + P <= 400, name="Total land constraint")

    # Update model
    m.update()

    # Solve the model
    m.optimize()

    # Print the results
    if m.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal acres of apple trees: {A.varValue}")
        print(f"Optimal acres of peach trees: {P.varValue}")
        print(f"Max Profit: ${900*A.varValue + 1100*P.varValue}")
    else:
        print("The model is infeasible")

solve_farmer_problem()
```