To solve this optimization problem, we need to maximize the profit from selling two types of sandwiches (A and B) given the constraints on the availability of cheddar and American cheese. Let's denote the number of Sandwich A to be made as \(x_A\) and the number of Sandwich B to be made as \(x_B\).

The objective function, which represents the total profit, is given by:
\[ \text{Maximize} \quad 5x_A + 6x_B \]

We have two main constraints based on the availability of cheese:
1. For cheddar cheese: \(3x_A + 5x_B \leq 500\)
2. For American cheese: \(3x_A + 2x_B \leq 400\)

Additionally, we have non-negativity constraints since the shop cannot make a negative number of sandwiches:
\[ x_A \geq 0 \]
\[ x_B \geq 0 \]

Now, let's translate this problem into Gurobi code in Python:

```python
from gurobipy import *

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

# Define variables
x_A = m.addVar(name="Sandwich_A", lb=0)
x_B = m.addVar(name="Sandwich_B", lb=0)

# Set the objective function
m.setObjective(5*x_A + 6*x_B, GRB.MAXIMIZE)

# Add constraints
m.addConstr(3*x_A + 5*x_B <= 500, name="Cheddar_Cheese_Constraint")
m.addConstr(3*x_A + 2*x_B <= 400, name="American_Cheese_Constraint")

# Optimize the model
m.optimize()

# Print results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found.")
    print(f"Number of Sandwich A: {x_A.x}")
    print(f"Number of Sandwich B: {x_B.x}")
    print(f"Total Profit: ${5*x_A.x + 6*x_B.x:.2f}")
else:
    print("No optimal solution found.")
```