To solve this optimization problem, we first need to define the decision variables and the objective function. Let's denote the number of student versions produced as \(x\) and the number of professional versions produced as \(y\). The profit per student version is $400, and the profit per professional version is $1500. Therefore, the total profit can be represented as \(400x + 1500y\).

The constraints are:
1. The company cannot sell more than 350 licenses combined: \(x + y \leq 350\).
2. The production cost for student and professional versions is $750 and $3000 respectively, and the total budget is $500,000: \(750x + 3000y \leq 500,000\).

We also have non-negativity constraints since we cannot produce a negative number of software packages: \(x \geq 0\) and \(y \geq 0\).

The goal is to maximize the profit function \(400x + 1500y\) under these constraints.

Here's how we can translate this problem into Gurobi code in Python:

```python
from gurobipy import *

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

# Define the decision variables
x = m.addVar(vtype=GRB.CONTINUOUS, name="student_version")
y = m.addVar(vtype=GRB.CONTINUOUS, name="professional_version")

# Set the objective function to maximize profit
m.setObjective(400*x + 1500*y, GRB.MAXIMIZE)

# Add constraints
m.addConstr(x + y <= 350, "combined_licenses")
m.addConstr(750*x + 3000*y <= 500000, "production_budget")

# Optimize the model
m.optimize()

# Print the results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Student versions to produce: {x.x}")
    print(f"Professional versions to produce: {y.x}")
    print(f"Maximum profit: ${400*x.x + 1500*y.x}")
else:
    print("No optimal solution found")
```