To solve this problem, we first need to define the variables and constraints based on the given information.

Let's denote:
- \(G\) as the number of guided tickets sold,
- \(R\) as the number of regular tickets sold.

The objective is to maximize profit. The profit per guided ticket is $50, and the profit per regular ticket is $20. Therefore, the total profit \(P\) can be represented as:
\[ P = 50G + 20R \]

The constraints are:
1. The museum can sell at most 300 tickets in total:
\[ G + R \leq 300 \]
2. At least 50 tickets must be guided:
\[ G \geq 50 \]
3. At least 3 times as many people prefer to buy regular tickets than guided tickets:
\[ R \geq 3G \]

To find the optimal solution, we need to maximize \(P\) under these constraints.

Here is how you can represent this problem in Gurobi using Python:

```python
from gurobipy import *

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

# Define variables
G = m.addVar(name="Guided_Tickets", lb=0, vtype=GRB.CONTINUOUS)
R = m.addVar(name="Regular_Tickets", lb=0, vtype=GRB.CONTINUOUS)

# Set the objective function: Maximize profit
m.setObjective(50*G + 20*R, GRB.MAXIMIZE)

# Add constraints
m.addConstr(G + R <= 300, name="Total_Tickets")
m.addConstr(G >= 50, name="Min_Guided_Tickets")
m.addConstr(R >= 3*G, name="Regular_vs_Guided")

# Optimize the model
m.optimize()

# Print the results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Guided Tickets: {G.x}")
    print(f"Regular Tickets: {R.x}")
    print(f"Total Profit: {m.ObjVal}")
else:
    print("No optimal solution found")
```