## Problem Description and Formulation

The West Coast train company has a total of 300 seats, which are divided into first-class seats and regular seats. The profit made on each first-class seat is $1200, and on each regular seat is $700. The company has to reserve at least 50 seats as first-class. Additionally, due to the pandemic being over, at least 3 times as many people prefer regular seats to first-class seats.

## Symbolic Representation

Let's denote:
- \(x\) as the number of first-class seats to be sold.
- \(y\) as the number of regular seats to be sold.

The objective is to maximize profit \(P = 1200x + 700y\).

Subject to the constraints:
1. Total seats: \(x + y \leq 300\)
2. Minimum first-class seats: \(x \geq 50\)
3. Preference for regular seats over first-class: \(y \geq 3x\)
4. Non-negativity: \(x \geq 0, y \geq 0\)

Since \(x\) and \(y\) represent the number of seats, they must be integers.

## Gurobi Code

```python
import gurobi

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

    # Define the variables
    x = model.addVar(lb=0, vtype=gurobi.GRB.INTEGER, name="first_class_seats")
    y = model.addVar(lb=0, vtype=gurobi.GRB.INTEGER, name="regular_seats")

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

    # Constraints
    model.addConstr(x + y <= 300, name="total_seats")
    model.addConstr(x >= 50, name="min_first_class_seats")
    model.addConstr(y >= 3*x, name="preference_regular_seats")

    # Solve the model
    model.optimize()

    # Print the solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal Solution: First-class seats = {x.varValue}, Regular seats = {y.varValue}")
        print(f"Maximum Profit: ${1200*x.varValue + 700*y.varValue}")
    else:
        print("The model is infeasible")

solve_train_seating_problem()
```