## Problem Description and Formulation

The problem is an optimization problem with two variables: 'hours worked by Peggy' and 'hours worked by Ringo'. The objective is to maximize the function $7 \times \text{hours worked by Peggy} + 4 \times \text{hours worked by Ringo}$.

The problem has several constraints:

1. **Individual Resource Constraints**:
   - Peggy's likelihood to quit index: $1 \times \text{hours worked by Peggy} \leq 55$
   - Ringo's likelihood to quit index: $5 \times \text{hours worked by Ringo} \leq 55$
   - Peggy's computer competence rating: $6 \times \text{hours worked by Peggy} \leq 103$
   - Ringo's computer competence rating: $7 \times \text{hours worked by Ringo} \leq 103$

2. **Combined Resource Constraints**:
   - Combined likelihood to quit index: $1 \times \text{hours worked by Peggy} + 5 \times \text{hours worked by Ringo} \geq 21$ and $1 \times \text{hours worked by Peggy} + 5 \times \text{hours worked by Ringo} \leq 44$
   - Combined computer competence rating: $6 \times \text{hours worked by Peggy} + 7 \times \text{hours worked by Ringo} \geq 48$ and $6 \times \text{hours worked by Peggy} + 7 \times \text{hours worked by Ringo} \leq 98$

3. **Linear Constraint**:
   - $3 \times \text{hours worked by Peggy} - 8 \times \text{hours worked by Ringo} \geq 0$

4. **Variable Constraints**:
   - $\text{hours worked by Peggy} \geq 0$ (can be fractional)
   - $\text{hours worked by Ringo} \geq 0$ and is an integer

## Gurobi Code Formulation

```python
import gurobipy as gp

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

# Define variables
hours_peggy = m.addVar(lb=0, name="hours_worked_by_Peggy")  # Can be fractional
hours_ringo = m.addVar(lb=0, vtype=gp.GRB.INTEGER, name="hours_worked_by_Ringo")  # Must be an integer

# Objective function: Maximize 7*hours_peggy + 4*hours_ringo
m.setObjective(7 * hours_peggy + 4 * hours_ringo, gp.GRB.MAXIMIZE)

# Constraints
m.addConstr(hours_peggy * 1 <= 55, "peggy_quit_index")
m.addConstr(hours_ringo * 5 <= 55, "ringo_quit_index")
m.addConstr(hours_peggy * 6 <= 103, "peggy_computer_rating")
m.addConstr(hours_ringo * 7 <= 103, "ringo_computer_rating")

m.addConstr(hours_peggy * 1 + hours_ringo * 5 >= 21, "combined_quit_index_min")
m.addConstr(hours_peggy * 1 + hours_ringo * 5 <= 44, "combined_quit_index_max")

m.addConstr(hours_peggy * 6 + hours_ringo * 7 >= 48, "combined_computer_rating_min")
m.addConstr(hours_peggy * 6 + hours_ringo * 7 <= 98, "combined_computer_rating_max")

m.addConstr(hours_peggy * 3 - hours_ringo * 8 >= 0, "linear_constraint")

# Solve the model
m.optimize()

# Print the solution
if m.status == gp.GRB.OPTIMAL:
    print("Optimal Solution:")
    print(f"Hours worked by Peggy: {hours_peggy.varValue}")
    print(f"Hours worked by Ringo: {hours_ringo.varValue}")
    print(f"Objective: {m.objVal}")
else:
    print("The model is infeasible.")
```