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

- \(x\) as the number of pairs of skis to buy and sell.
- \(y\) as the number of snowboards to buy and sell.

The profit from selling one pair of skis is $200, and the cost is $500, so the net profit per pair of skis sold is $200 - $500 = -$300 (since we're considering the profit after purchasing). However, this interpretation was incorrect; the correct approach should consider the revenue generated by selling each item minus its cost. Therefore, for skis, it's $200 profit after accounting for the selling price and cost, but to clarify:

- The selling price of one pair of skis is not given directly, so let's denote the selling price per pair of skis as \(S_{skis}\) and per snowboard as \(S_{snowboards}\). According to the problem, each ski is sold for a profit of $200, implying if the cost is $500, then \(S_{skis} = 500 + 200 = \$700\).
- Similarly, each snowboard costs $400 and is sold for a profit of $175, so \(S_{snowboards} = 400 + 175 = \$575\).

Thus, the correct interpretation of profits should be based on the selling prices minus the costs:

- Profit per pair of skis: $700 - $500 = $200.
- Profit per snowboard: $575 - $400 = $175.

Given this correction, our objective is to maximize profit \(P\) given by:
\[ P = 200x + 175y \]

Subject to the constraints:

1. Budget constraint: The total cost of buying skis and snowboards must not exceed $20,000.
\[ 500x + 400y \leq 20,000 \]

2. Skis sales constraint: At least 10 but at most 30 pairs of skis will be sold.
\[ 10 \leq x \leq 30 \]

3. Snowboards sales constraint: The number of snowboards sold is at most half the number of skis sold.
\[ y \leq \frac{1}{2}x \]

4. Non-negativity constraints (since we cannot sell a negative number of items):
\[ x, y \geq 0 \]

Given these constraints and objectives, the problem can be formulated in Gurobi as follows:

```python
from gurobipy import *

# Create a new model
m = Model("Winter_Sports_Store")

# Define variables
x = m.addVar(lb=10, ub=30, vtype=GRB.INTEGER, name="skis")
y = m.addVar(vtype=GRB.INTEGER, name="snowboards")

# Set objective function
m.setObjective(200*x + 175*y, GRB.MAXIMIZE)

# Add constraints
m.addConstr(500*x + 400*y <= 20000, "budget")
m.addConstr(y <= 0.5*x, "snowboard_limit")

# Optimize model
m.optimize()

# Print solution
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Skis to buy and sell: {x.x}")
    print(f"Snowboards to buy and sell: {y.x}")
    print(f"Maximum profit: {m.objVal}")
else:
    print("No optimal solution found")
```