## Symbolic Representation of the Problem

The problem can be converted into a symbolic representation as follows:

- Let $x_1$ be the number of boat trips.
- Let $x_2$ be the number of neighbor trips.

The objective is to maximize the total number of units of berries transported, which can be represented as $200x_1 + 40x_2$.

The constraints are:
1. The total cost should not exceed $500: $30x_1 + 8x_2 \leq 500$.
2. The number of boat trips cannot exceed the number of trips his neighbor does: $x_1 \leq x_2$.
3. The number of trips for both boat and neighbor must be non-negative: $x_1 \geq 0, x_2 \geq 0$.

## Symbolic Representation in JSON Format

```json
{
    'sym_variables': [('x1', 'boat trips'), ('x2', 'neighbor trips')],
    'objective_function': '200*x1 + 40*x2',
    'constraints': [
        '30*x1 + 8*x2 <= 500',
        'x1 <= x2',
        'x1 >= 0',
        'x2 >= 0'
    ]
}
```

## Gurobi Code in Python

```python
import gurobi

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

    # Define variables
    x1 = model.addVar(name="boat_trips", lb=0, ub=None, vtype=gurobi.GRB.INTEGER)
    x2 = model.addVar(name="neighbor_trips", lb=0, ub=None, vtype=gurobi.GRB.INTEGER)

    # Objective function: maximize 200*x1 + 40*x2
    model.setObjective(200*x1 + 40*x2, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(30*x1 + 8*x2 <= 500, name="cost_constraint")
    model.addConstr(x1 <= x2, name="boat_neighbor_constraint")

    # Solve the model
    model.optimize()

    # Check if the model is optimized
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal Solution:")
        print(f"Boat Trips: {x1.varValue}")
        print(f"Neighbor Trips: {x2.varValue}")
        print(f"Total Berries: {200*x1.varValue + 40*x2.varValue}")
    else:
        print("The model is infeasible.")

solve_optimization_problem()
```