## Problem Description and Formulation

The electronics store sells televisions and speakers. The goal is to maximize profit given certain constraints.

- Cost of a television: $400
- Cost of a speaker: $200
- Maximum budget: $25,000
- Minimum televisions to sell: 20
- Maximum televisions to sell: 75
- Maximum speakers to sell: Half of the number of televisions sold
- Profit per television: $400
- Profit per speaker: $250

Let's denote:
- \(T\) as the number of televisions sold
- \(S\) as the number of speakers sold

The objective function to maximize profit (\(P\)) is:
\[P = 400T + 250S\]

Constraints:
1. Budget constraint: \(400T + 200S \leq 25000\)
2. Television sales constraints: \(20 \leq T \leq 75\)
3. Speaker sales constraint: \(S \leq 0.5T\)
4. Non-negativity constraints: \(T \geq 0, S \geq 0\)

However, since \(T\) and \(S\) represent quantities sold, we assume \(T \geq 0\) and \(S \geq 0\). The constraint \(20 \leq T \leq 75\) already implies \(T > 0\).

## Gurobi Code Formulation

```python
import gurobi

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

    # Define variables
    T = model.addVar(lb=20, ub=75, vtype=gurobi.GRB.INTEGER, name="Televisions")
    S = model.addVar(vtype=gurobi.GRB.INTEGER, name="Speakers")

    # Objective function: Maximize profit
    model.setObjective(400*T + 250*S, gurobi.GRB.MAXIMIZE)

    # Budget constraint
    model.addConstr(400*T + 200*S <= 25000, name="Budget_Constraint")

    # Speaker sales constraint: S <= 0.5T
    model.addConstr(S <= 0.5*T, name="Speaker_Sales_Constraint")

    # Solve the model
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal solution found: Televisions = {T.varValue}, Speakers = {S.varValue}")
        print(f"Max Profit: ${400*T.varValue + 250*S.varValue}")
    else:
        print("No optimal solution found")

solve_optimization_problem()
```

This code defines the optimization problem using Gurobi's Python interface, sets up the objective function and constraints according to the problem description, and solves the model to find the optimal number of televisions and speakers to sell for maximum profit.