To solve this optimization problem, we first need to define the decision variables and the objective function. Let's denote:

- $x_s$ as the number of short words spelled,
- $x_l$ as the number of long words spelled.

The objective is to maximize the total points earned from spelling these words. Since each short word is worth 3 points and each long word is worth 6 points, the objective function can be written as:

\[ \text{Maximize:} \quad 3x_s + 6x_l \]

Given the constraints:
1. At least 5 short words must be spelled: $x_s \geq 5$
2. At least 2 long words must be spelled: $x_l \geq 2$
3. At most 10 short words can be spelled: $x_s \leq 10$
4. At most 5 long words can be spelled: $x_l \leq 5$
5. The total number of words spelled cannot exceed 10: $x_s + x_l \leq 10$

All decision variables are non-negative since they represent counts of words.

This problem can be formulated as a linear programming (LP) problem, which can be solved using Gurobi in Python. Here is how you could implement it:

```python
from gurobipy import *

# Create a model
m = Model("Spelling_Bee_Optimization")

# Define the decision variables
x_s = m.addVar(lb=5, ub=10, vtype=GRB.INTEGER, name="short_words")
x_l = m.addVar(lb=2, ub=5, vtype=GRB.INTEGER, name="long_words")

# Set the objective function
m.setObjective(3*x_s + 6*x_l, GRB.MAXIMIZE)

# Add constraints
m.addConstr(x_s + x_l <= 10, "total_words_limit")

# Solve the model
m.optimize()

# Print the solution
if m.status == GRB.OPTIMAL:
    print(f"Optimal solution: {x_s.varName} = {x_s.x}, {x_l.varName} = {x_l.x}")
    print(f"Maximum points: {m.objVal}")
else:
    print("No optimal solution found")
```