## Problem Description and Formulation

The problem requires maximizing an objective function subject to several constraints. The objective function is:

\[ 8.61 \times (\text{hours worked by Jean})^2 + 8.54 \times (\text{hours worked by Jean}) \times (\text{hours worked by George}) + 1.04 \times (\text{hours worked by George})^2 + 3.32 \times (\text{hours worked by Jean}) + 8.36 \times (\text{hours worked by George}) \]

The constraints are:

1. Jean's work quality rating is 17.
2. George's work quality rating is 6.
3. The total combined work quality rating from hours worked by Jean squared and hours worked by George squared must be at least 49.
4. \(3 \times (\text{hours worked by Jean})^2 - 9 \times (\text{hours worked by George})^2 \geq 0\).
5. The total combined work quality rating from hours worked by Jean and hours worked by George should be 152 or less.
6. The total combined work quality rating from hours worked by Jean and hours worked by George must be 152 at maximum.
7. The hours worked by Jean must be an integer.
8. The hours worked by George must be an integer.

## Gurobi Code Formulation

Given the problem description, we can formulate the Gurobi code as follows:

```python
import gurobi

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

    # Define variables
    jean_hours = model.addVar(name="jean_hours", vtype=gurobi.GRB.INTEGER)
    george_hours = model.addVar(name="george_hours", vtype=gurobi.GRB.INTEGER)

    # Objective function
    model.setObjective(8.61 * jean_hours**2 + 8.54 * jean_hours * george_hours + 1.04 * george_hours**2 + 3.32 * jean_hours + 8.36 * george_hours, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(jean_hours, gurobi.GRB.EQUAL, 17, "jean_work_quality")
    model.addConstr(george_hours, gurobi.GRB.EQUAL, 6, "george_work_quality")
    model.addConstr(jean_hours**2 + george_hours**2, gurobi.GRB.GREATER_EQUAL, 49, "min_work_quality_squared")
    model.addConstr(3 * jean_hours**2 - 9 * george_hours**2, gurobi.GRB.GREATER_EQUAL, 0, "quality_constraint")
    model.addConstr(jean_hours + george_hours, gurobi.GRB.LESS_EQUAL, 152, "max_work_quality")

    # Solve the model
    model.optimize()

    # Print the solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal Solution:")
        print(f"Jean's hours: {jean_hours.varValue}")
        print(f"George's hours: {george_hours.varValue}")
        print(f"Objective: {model.objVal}")
    else:
        print("The model is infeasible.")

optimization_problem()
```

This code defines the optimization problem with the given objective function and constraints, and then solves it using Gurobi. Note that the work quality ratings for Jean and George are directly set as constraints, and the rest of the constraints are implemented as described. The solution is then printed out if the model is optimal; otherwise, it indicates that the model is infeasible.