To solve the given optimization problem, we first need to translate the natural language description into a symbolic representation. This involves defining variables for the quantities of cheese and pepperoni pizzas to be made, formulating the objective function that represents the total profit, and listing the constraints based on the available resources (flour, cheese, and sauce).

Let's define:
- \(x_1\) as the number of cheese pizzas to be made.
- \(x_2\) as the number of pepperoni pizzas to be made.

The objective function, which is to maximize profit, can be represented as:
\[7x_1 + 9x_2\]

The constraints based on the available resources are:
1. Flour constraint: \(30x_1 + 40x_2 \leq 3000\)
2. Cheese constraint: \(50x_1 + 20x_2 \leq 4000\)
3. Sauce constraint: \(40x_1 + 30x_2 \leq 5000\)

Additionally, since the number of pizzas cannot be negative:
4. Non-negativity constraints: \(x_1 \geq 0\) and \(x_2 \geq 0\)

In symbolic notation, our problem can be represented as:
```json
{
    'sym_variables': [('x1', 'number of cheese pizzas'), ('x2', 'number of pepperoni pizzas')],
    'objective_function': '7*x1 + 9*x2',
    'constraints': ['30*x1 + 40*x2 <= 3000', '50*x1 + 20*x2 <= 4000', '40*x1 + 30*x2 <= 5000', 'x1 >= 0', 'x2 >= 0']
}
```

To solve this problem using Gurobi in Python, we'll write the following code:

```python
from gurobipy import *

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

# Define variables
x1 = m.addVar(vtype=GRB.CONTINUOUS, name="cheese_pizzas")
x2 = m.addVar(vtype=GRB.CONTINUOUS, name="pepperoni_pizzas")

# Set the objective function
m.setObjective(7*x1 + 9*x2, GRB.MAXIMIZE)

# Add constraints
m.addConstr(30*x1 + 40*x2 <= 3000, "flour_constraint")
m.addConstr(50*x1 + 20*x2 <= 4000, "cheese_constraint")
m.addConstr(40*x1 + 30*x2 <= 5000, "sauce_constraint")

# Optimize the model
m.optimize()

# Print the results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Number of cheese pizzas: {x1.x}")
    print(f"Number of pepperoni pizzas: {x2.x}")
    print(f"Total profit: {m.objVal}")
else:
    print("No optimal solution found")
```