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 batches of pancakes produced.
- \(y\) as the number of batches of pretzels produced.

The profit per batch of pancakes is $25, and the profit per batch of pretzels is $50. Thus, the total profit (objective function) can be represented as:
\[ \text{Maximize} \quad 25x + 50y \]

Given the constraints:
- Each batch of pancakes requires 2.5 hours of oven time.
- Each batch of pretzels requires 1.5 hours of oven time.
- The total available oven time is 65 hours.
- This leads to the first constraint: \(2.5x + 1.5y \leq 65\).

- Each batch of pancakes requires 0.5 hours of pastry chef time.
- Each batch of pretzels requires 3 hours of pastry chef time.
- The total available pastry chef time is 35 hours.
- This leads to the second constraint: \(0.5x + 3y \leq 35\).

Additionally, since we cannot produce a negative number of batches, we have non-negativity constraints:
\[ x \geq 0 \]
\[ y \geq 0 \]

To use all the available capacity and maximize profit, we aim to find the values of \(x\) and \(y\) that satisfy these constraints while maximizing our objective function.

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

```python
from gurobipy import *

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

# Define variables
x = m.addVar(vtype=GRB.CONTINUOUS, name="pancakes", lb=0)
y = m.addVar(vtype=GRB.CONTINUOUS, name="pretzels", lb=0)

# Set the objective function
m.setObjective(25*x + 50*y, GRB.MAXIMIZE)

# Add constraints
m.addConstr(2.5*x + 1.5*y <= 65, "oven_time")
m.addConstr(0.5*x + 3*y <= 35, "pastry_chef_time")

# Optimize model
m.optimize()

# Print results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Pancakes: {x.x}")
    print(f"Pretzels: {y.x}")
    print(f"Maximum Profit: ${25*x.x + 50*y.x:.2f}")
else:
    print("No optimal solution found")
```