## Step 1: Define the symbolic representation of the problem
Let's denote the number of first-class seats as $x_1$ and the number of second-class seats as $x_2$. The profit for each first-class seat is $75, and for each second-class seat is $50. The objective is to maximize the total profit.

## Step 2: Formulate the objective function
The objective function to maximize profit is $75x_1 + 50x_2$.

## 3: Define the constraints based on the problem description
1. The train carries at most 500 passengers: $x_1 + x_2 \leq 500$.
2. The train reserves at least 100 seats for first-class: $x_1 \geq 100$.
3. At least twice as many passengers prefer second-class than first-class: $x_2 \geq 2x_1$.

## 4: Symbolic representation in JSON format
```json
{
    'sym_variables': [('x1', 'first-class seats'), ('x2', 'second-class seats')],
    'objective_function': '75*x1 + 50*x2',
    'constraints': [
        'x1 + x2 <= 500',
        'x1 >= 100',
        'x2 >= 2*x1'
    ]
}
```

## 5: Convert the problem into Gurobi code in Python
To solve this linear programming problem using Gurobi, we will use the Gurobi Python interface. First, ensure you have Gurobi installed in your Python environment. You can install it via pip: `pip install gurobi`.

```python
import gurobi as gp

# Create a new model
m = gp.Model("Train_Seats")

# Define variables
x1 = m.addVar(name="first_class_seats", lb=0, ub=500, vtype=gp.GRB.INTEGER)  # First-class seats
x2 = m.addVar(name="second_class_seats", lb=0, ub=500, vtype=gp.GRB.INTEGER)  # Second-class seats

# Objective function: Maximize profit
m.setObjective(75 * x1 + 50 * x2, gp.GRB.MAXIMIZE)

# Constraints
m.addConstr(x1 + x2 <= 500, name="total_passengers")  # Total passengers not exceeding 500
m.addConstr(x1 >= 100, name="first_class_min")  # At least 100 first-class seats
m.addConstr(x2 >= 2 * x1, name="second_class_pref")  # Second-class preference

# Solve the model
m.optimize()

# Print solution
if m.status == gp.GRB.OPTIMAL:
    print(f"Optimal first-class seats: {x1.varValue}")
    print(f"Optimal second-class seats: {x2.varValue}")
    print(f"Max Profit: ${75 * x1.varValue + 50 * x2.varValue}")
else:
    print("The model is infeasible.")
```