## Problem Description and Formulation

The problem is a classic example of a linear programming problem. James wants to maximize his profit by planting aster flowers and stonecrops in a 120 square feet field. The goal is to find the optimal allocation of the field to aster flowers and stonecrops that maximizes James' profit, given the costs of seeds and the available budget.

Let's denote:
- \(x_1\) as the area (in square feet) allocated to aster flowers,
- \(x_2\) as the area (in square feet) allocated to stonecrops.

## Objective Function

The profit per square foot of aster flowers is $60, and the profit per square foot of stonecrops is $80. Therefore, the total profit \(P\) can be represented as:
\[ P = 60x_1 + 80x_2 \]

The objective is to maximize \(P\).

## Constraints

1. **Field Size Constraint**: The total area used for both plants cannot exceed 120 square feet.
\[ x_1 + x_2 \leq 120 \]

2. **Budget Constraint**: The seed for aster costs $20 per square foot, and the seed for stonecrops costs $45 per square foot. James has a budget of $5000.
\[ 20x_1 + 45x_2 \leq 5000 \]

3. **Non-Negativity Constraints**: The areas allocated to both plants cannot be negative.
\[ x_1 \geq 0, x_2 \geq 0 \]

## Gurobi Code

```python
import gurobi

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

    # Define variables
    x1 = model.addVar(lb=0, name="Aster_Flowers")  # Area for aster flowers
    x2 = model.addVar(lb=0, name="Stonecrops")  # Area for stonecrops

    # Objective function: Maximize profit
    model.setObjective(60 * x1 + 80 * x2, gurobi.GRB.MAXIMIZE)

    # Field size constraint
    model.addConstr(x1 + x2 <= 120, name="Field_Size")

    # Budget constraint
    model.addConstr(20 * x1 + 45 * x2 <= 5000, name="Budget")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal Solution:")
        print(f"Aster Flowers: {x1.varValue} sq ft")
        print(f"Stonecrops: {x2.varValue} sq ft")
        print(f"Max Profit: ${model.objVal:.2f}")
    else:
        print("No optimal solution found.")

solve_optimization_problem()
```