To solve the given optimization problem, let's first break down the natural language description into a symbolic representation. We have two artists: a pop artist and a rapper. Let's denote the amount invested in the rapper as $x_1$ and the amount invested in the pop artist as $x_2$. The objective is to maximize earnings, with the money invested in the rapper earning 5% and the money invested in the pop artist earning 3%. We have constraints on the total investment ($400,000), the minimum ratio of investment between the pop artist and the rapper (at least three times as much in the pop artist as in the rapper), and a maximum amount that can be invested in the pop artist ($250,000).

The symbolic representation is:
```json
{
  'sym_variables': [('x1', 'amount invested in the rapper'), ('x2', 'amount invested in the pop artist')],
  'objective_function': '0.05*x1 + 0.03*x2',
  'constraints': [
    'x1 + x2 <= 400000',  # Total investment constraint
    'x2 >= 3*x1',          # Minimum ratio of pop to rapper investment
    'x2 <= 250000',        # Maximum investment in the pop artist
    'x1 >= 0',             # Non-negativity constraint for rapper investment
    'x2 >= 0'              # Non-negativity constraint for pop artist investment
  ]
}
```

Now, let's translate this into Gurobi code to solve the optimization problem:
```python
from gurobipy import *

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

# Define variables
x1 = m.addVar(name="Rapper_Investment", lb=0)  # Amount invested in the rapper
x2 = m.addVar(name="Pop_Artist_Investment", lb=0)  # Amount invested in the pop artist

# Set objective function: Maximize earnings
m.setObjective(0.05*x1 + 0.03*x2, GRB.MAXIMIZE)

# Add constraints
m.addConstr(x1 + x2 <= 400000, name="Total_Investment")  # Total investment constraint
m.addConstr(x2 >= 3*x1, name="Investment_Ratio")  # Minimum ratio of pop to rapper investment
m.addConstr(x2 <= 250000, name="Max_Pop_Investment")  # Maximum investment in the pop artist

# Optimize model
m.optimize()

# Print results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Amount invested in the rapper: ${x1.X:.2f}")
    print(f"Amount invested in the pop artist: ${x2.X:.2f}")
    print(f"Total earnings: ${m.ObjVal:.2f}")
else:
    print("No optimal solution found.")
```