## Problem Description and Formulation

The problem requires minimizing an objective function subject to several constraints. The objective function to be minimized is:

\[ 8 \times (\text{hours worked by Peggy} \times \text{hours worked by Hank}) + 1 \times (\text{hours worked by George})^2 + 1 \times (\text{hours worked by Peggy}) \]

The constraints are:

1. Peggy's paperwork competence rating is 1.
2. Peggy's work quality rating is 1.
3. Hank's paperwork competence rating is 8.
4. Hank's work quality rating is 2.
5. George's paperwork competence rating is 6.
6. George's work quality rating is 3.
7. \((\text{hours worked by Hank})^2 + (\text{hours worked by George})^2 \geq 28\)
8. \((\text{hours worked by Peggy}) + (\text{hours worked by Hank}) + (\text{hours worked by George}) \geq 28\)
9. \((\text{hours worked by Hank}) + (\text{hours worked by George}) \geq 23\)
10. \((\text{hours worked by Peggy})^2 + (\text{hours worked by George})^2 \geq 24\)
11. \((\text{hours worked by Peggy})^2 + (\text{hours worked by Hank})^2 + (\text{hours worked by George})^2 \geq 21\)
12. \((\text{hours worked by Peggy}) + (\text{hours worked by Hank}) + (\text{hours worked by George}) \geq 21\)
13. \(9 \times (\text{hours worked by Peggy})^2 - 7 \times (\text{hours worked by Hank})^2 \geq 0\)
14. \((\text{hours worked by Peggy}) + (\text{hours worked by George}) \leq 79\)
15. \((\text{hours worked by Hank})^2 + (\text{hours worked by George})^2 \leq 58\)

## Gurobi Code Formulation

```python
import gurobipy as gp

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

# Define variables
peggy_hours = m.addVar(name="peggy_hours", lb=0)  # No upper bound given, assuming 0 is lower bound
hank_hours = m.addVar(name="hank_hours", lb=0)  # No upper bound given, assuming 0 is lower bound
george_hours = m.addVar(name="george_hours", lb=0)  # No upper bound given, assuming 0 is lower bound

# Objective function
m.setObjective(8 * peggy_hours * hank_hours + george_hours ** 2 + peggy_hours, gp.GRB.MINIMIZE)

# Constraints
m.addConstr(peggy_hours >= 0)  # Implicit, but for clarity
m.addConstr(hank_hours >= 0)  # Implicit, but for clarity
m.addConstr(george_hours >= 0)  # Implicit, but for clarity

# Constraint 7
m.addConstr(hank_hours ** 2 + george_hours ** 2 >= 28)

# Constraint 8
m.addConstr(peggy_hours + hank_hours + george_hours >= 28)

# Constraint 9
m.addConstr(hank_hours + george_hours >= 23)

# Constraint 10
m.addConstr(peggy_hours ** 2 + george_hours ** 2 >= 24)

# Constraint 11
m.addConstr(peggy_hours ** 2 + hank_hours ** 2 + george_hours ** 2 >= 21)

# Constraint 12
m.addConstr(peggy_hours + hank_hours + george_hours >= 21)

# Constraint 13
m.addConstr(9 * peggy_hours ** 2 - 7 * hank_hours ** 2 >= 0)

# Constraint 14
m.addConstr(peggy_hours + george_hours <= 79)

# Constraint 15
m.addConstr(hank_hours ** 2 + george_hours ** 2 <= 58)

# Solve the model
m.optimize()

# Print solution
if m.status == gp.GRB.OPTIMAL:
    print("Optimal Solution:")
    print(f"Peggy's hours: {peggy_hours.varValue}")
    print(f"Hank's hours: {hank_hours.varValue}")
    print(f"George's hours: {george_hours.varValue}")
    print(f"Objective: {m.objVal}")
else:
    print("No optimal solution found.")
```