## Step 1: Define the symbolic representation of the problem
Let's denote the amount invested in the younger sister's company as \(x_1\) and the amount invested in the elder sister's company as \(x_2\). The objective is to maximize profit \(P = 0.05x_1 + 0.08x_2\).

## Step 2: Identify the constraints
1. The total investment is $5000: \(x_1 + x_2 \leq 5000\)
2. A minimum of 40% of the investment should go to the younger sister's company: \(x_1 \geq 0.4(x_1 + x_2)\)
3. At least $2000 should be invested in the elder sister's company: \(x_2 \geq 2000\)
4. Non-negativity constraints: \(x_1 \geq 0, x_2 \geq 0\)

## Step 3: Convert constraints into standard form
1. \(x_1 + x_2 \leq 5000\)
2. \(x_1 \geq 0.4x_1 + 0.4x_2\) simplifies to \(0.6x_1 - 0.4x_2 \geq 0\)
3. \(x_2 \geq 2000\)
4. \(x_1, x_2 \geq 0\)

## 4: Symbolic Representation
```json
{
'sym_variables': [('x1', 'younger sister\'s company'), ('x2', 'elder sister\'s company')],
'objective_function': '0.05*x1 + 0.08*x2',
'constraints': [
'x1 + x2 <= 5000',
'x1 >= 0.4*(x1 + x2)',
'x2 >= 2000',
'x1 >= 0',
'x2 >= 0'
]
}
```

## 5: Gurobi Code
```python
import gurobi

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

    # Define variables
    x1 = model.addVar(name="younger_sister_company", lb=0)
    x2 = model.addVar(name="elder_sister_company", lb=0)

    # Objective function
    model.setObjective(0.05 * x1 + 0.08 * x2, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(x1 + x2 <= 5000, name="total_investment")
    model.addConstr(x1 >= 0.4 * (x1 + x2), name="min_younger_sister")
    model.addConstr(x2 >= 2000, name="min_elder_sister")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal investment in younger sister's company: ", x1.varValue)
        print("Optimal investment in elder sister's company: ", x2.varValue)
        print("Max Profit: ", model.objVal)
    else:
        print("No optimal solution found")

solve_investment_problem()
```