To solve the given optimization problem, we first need to identify the decision variables, constraints, and the objective function. The decision variables in this case are the number of first-class seats (with pillows) and the number of second-class seats to be sold. Let's denote the number of first-class seats as \(x_1\) and the number of second-class seats as \(x_2\).

The constraints given are:
1. The total number of passengers (which is the sum of first-class and second-class passengers) cannot exceed 500.
2. At least 100 seats must be reserved for first-class passengers.
3. At least twice as many passengers prefer to travel by second class than by first class.

Mathematically, these constraints can be represented as:
1. \(x_1 + x_2 \leq 500\)
2. \(x_1 \geq 100\)
3. \(x_2 \geq 2x_1\)

The objective function aims to maximize profit. Given that the profit from each first-class seat is $75 and from each second-class seat is $50, the total profit \(P\) can be represented as:
\[P = 75x_1 + 50x_2\]

To find the optimal number of seats for each class that maximizes profit under these constraints, we will use Gurobi, a linear programming solver, in Python.

Here is how you could implement this problem using Gurobi in Python:

```python
from gurobipy import *

# Create a new model
m = Model("Train_Seat_Optimization")

# Define the decision variables
x1 = m.addVar(lb=0, vtype=GRB.INTEGER, name="First_class_seats")
x2 = m.addVar(lb=0, vtype=GRB.INTEGER, name="Second_class_seats")

# Set the objective function to maximize profit
m.setObjective(75*x1 + 50*x2, GRB.MAXIMIZE)

# Add constraints
m.addConstr(x1 + x2 <= 500, "Total_passengers")
m.addConstr(x1 >= 100, "First_class_minimum")
m.addConstr(x2 >= 2*x1, "Second_class_preferred")

# Optimize the model
m.optimize()

# Print out the results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"First class seats: {x1.x}")
    print(f"Second class seats: {x2.x}")
    print(f"Maximum profit: ${75*x1.x + 50*x2.x}")
else:
    print("No optimal solution found")

```python
```