Here's the formulation of the linear program and the Gurobi code to solve it:

**Decision Variables:**

*  `x`: Number of premium seats sold
*  `y`: Number of regular seats sold

**Objective Function:**

Maximize profit: `40x + 20y`

**Constraints:**

* **Total Seats:** `x + y <= 100`
* **Minimum Premium Seats:** `x >= 10`
* **Regular Seat Preference:** `y >= 5x`


```python
import gurobipy as gp
from gurobipy import GRB

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

# Create variables
x = m.addVar(vtype=GRB.INTEGER, name="premium_seats")
y = m.addVar(vtype=GRB.INTEGER, name="regular_seats")

# Set objective
m.setObjective(40*x + 20*y, GRB.MAXIMIZE)

# Add constraints
m.addConstr(x + y <= 100, "total_seats")
m.addConstr(x >= 10, "min_premium")
m.addConstr(y >= 5*x, "regular_preference")

# Optimize model
m.optimize()

if m.status == GRB.OPTIMAL:
    print(f"Optimal profit: ${m.objVal}")
    print(f"Premium seats: {x.x}")
    print(f"Regular seats: {y.x}")
elif m.status == GRB.INFEASIBLE:
    print("The model is infeasible.")
else:
    print(f"Optimization terminated with status {m.status}")

```
