To solve the given optimization problem, we first need to convert the natural language description into a symbolic representation. This involves defining variables, an objective function, and constraints based on the problem statement.

Let's define:
- $x_1$ as the number of cans of Soda 1 to buy,
- $x_2$ as the number of cans of Soda 2 to buy.

The objective is to minimize the total cost. The cost of a can of Soda 1 is $5, and the cost of a can of Soda 2 is $7. Thus, the objective function can be represented as:
\[ \text{Minimize} \quad 5x_1 + 7x_2 \]

The constraints are based on the requirements for caffeine and sugar intake:
- Each can of Soda 1 contains 3 units of caffeine, and each can of Soda 2 contains 2 units of caffeine. The total caffeine intake must be at least 50 units.
- Each can of Soda 1 contains 2 units of sugar, and each can of Soda 2 contains 5 units of sugar. The total sugar intake must be at least 40 units.

Therefore, the constraints can be represented as:
\[ 3x_1 + 2x_2 \geq 50 \] (caffeine constraint)
\[ 2x_1 + 5x_2 \geq 40 \] (sugar constraint)

Also, since we cannot buy a negative number of cans, we have non-negativity constraints:
\[ x_1 \geq 0 \]
\[ x_2 \geq 0 \]

In symbolic notation, our problem can be represented as:
```json
{
  'sym_variables': [('x1', 'number of cans of Soda 1'), ('x2', 'number of cans of Soda 2')],
  'objective_function': '5*x1 + 7*x2',
  'constraints': ['3*x1 + 2*x2 >= 50', '2*x1 + 5*x2 >= 40', 'x1 >= 0', 'x2 >= 0']
}
```

To solve this linear programming problem using Gurobi in Python, we can use the following code:
```python
from gurobipy import *

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

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

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

# Add constraints
m.addConstr(3*x1 + 2*x2 >= 50, name="caffeine_constraint")
m.addConstr(2*x1 + 5*x2 >= 40, name="sugar_constraint")

# Optimize the model
m.optimize()

# Print the results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Buy {x1.x} cans of Soda 1")
    print(f"Buy {x2.x} cans of Soda 2")
    print(f"Total cost: ${m.objVal}")
else:
    print("No optimal solution found")
```