## Problem Description and Formulation

The problem is a linear programming optimization problem. The woman has $5000 to invest in her sisters' companies. There are two companies: her younger sister's company (Y) and her elder sister's company (E). The profit per dollar invested in Y is $0.05, and in E is $0.08.

The constraints are:
1. The total investment is $5000.
2. At least 40% of the investment must go to her younger sister's company (Y).
3. At least $2000 must be invested in her elder sister's company (E).

Let \(Y\) be the amount invested in the younger sister's company and \(E\) be the amount invested in the elder sister's company. The objective is to maximize profit \(P = 0.05Y + 0.08E\).

## Constraints Formulation

1. \(Y + E \leq 5000\) (The total investment cannot exceed $5000)
2. \(Y \geq 0.4 \times 5000 = 2000\) (At least 40% of $5000 must be invested in Y)
3. \(E \geq 2000\) (At least $2000 must be invested in E)
4. \(Y \geq 0\) and \(E \geq 0\) (Non-negativity constraints, investments cannot be negative)

## Gurobi Code

```python
import gurobi

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

    # Define variables
    Y = model.addVar(lb=0, name="Younger_Sister_Investment")
    E = model.addVar(lb=0, name="Elder_Sister_Investment")

    # Objective function: Maximize profit
    model.setObjective(0.05 * Y + 0.08 * E, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(Y + E <= 5000, name="Total_Investment")
    model.addConstr(Y >= 2000, name="Minimum_Y_Investment")
    model.addConstr(E >= 2000, name="Minimum_E_Investment")

    # Optimize model
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal investment in younger sister's company: ${Y.varValue:.2f}")
        print(f"Optimal investment in elder sister's company: ${E.varValue:.2f}")
        print(f"Maximum profit: ${0.05 * Y.varValue + 0.08 * E.varValue:.2f}")
    else:
        print("No optimal solution found.")

solve_investment_problem()
```

This code defines a linear programming problem with Gurobi, where the goal is to maximize the profit from investments in two sister's companies under given constraints. It then solves the problem and prints out the optimal investments and the maximum achievable profit.