To solve this optimization problem, we need to define the decision variables, the objective function, and the constraints.

Let's denote:
- $x_A$ as the number of Brand A sneakers bought and sold.
- $x_B$ as the number of Brand B sneakers bought and sold.

The profit per Brand A sneaker is $50, and the profit per Brand B sneaker is $75. Therefore, the total profit can be represented as $50x_A + 75x_B$.

The cost of buying Brand A sneakers is $100 each, and the cost of buying Brand B sneakers is $150 each. The boy can spend a total of $2000 on sneakers. This constraint can be represented as $100x_A + 150x_B \leq 2000$.

Additionally, he can sell at most 15 sneakers in total. This constraint can be represented as $x_A + x_B \leq 15$.

Since the boy cannot buy and sell a negative number of sneakers, we also have the non-negativity constraints: $x_A \geq 0$ and $x_B \geq 0$.

The objective is to maximize the total profit, which can be represented as $\max 50x_A + 75x_B$.

Now, let's write the Gurobi code in Python to solve this linear programming problem:

```python
from gurobipy import *

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

# Define the decision variables
x_A = m.addVar(lb=0, vtype=GRB.INTEGER, name="Brand_A_Sneakers")
x_B = m.addVar(lb=0, vtype=GRB.INTEGER, name="Brand_B_Sneakers")

# Define the objective function
m.setObjective(50*x_A + 75*x_B, GRB.MAXIMIZE)

# Define the constraints
m.addConstr(100*x_A + 150*x_B <= 2000, "Budget_Constraint")
m.addConstr(x_A + x_B <= 15, "Total_Sneakers_Constraint")

# Optimize the model
m.optimize()

# Print the results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Buy and sell {x_A.x} Brand A sneakers")
    print(f"Buy and sell {x_B.x} Brand B sneakers")
    print(f"Total profit: ${m.objVal}")
else:
    print("No optimal solution found")
```