To solve the given optimization problem, we first need to convert the natural language description into a symbolic representation. Let's define:

- $x_1$ as the number of reams of lined paper produced.
- $x_2$ as the number of reams of unlined paper produced.

The objective function is to maximize profit. Given that each package of lined paper sells at a profit of $5 and each package of unlined paper sells at a profit of $3, the objective function can be represented as:

\[ \text{Maximize:} \quad 5x_1 + 3x_2 \]

The constraints are based on the availability of machines:
- Each ream of lined paper requires 2 minutes on the printing machine and 5 minutes on the scanning machine.
- Each ream of unlined paper requires 1 minute on the printing machine and 2 minutes on the scanning machine.
- Each machine is available for a maximum of 400 minutes per day.

Thus, the constraints can be represented as:
1. For the printing machine: $2x_1 + x_2 \leq 400$
2. For the scanning machine: $5x_1 + 2x_2 \leq 400$
3. Non-negativity constraints: $x_1 \geq 0, x_2 \geq 0$ (since the company cannot produce a negative number of reams).

The symbolic representation in JSON format is:
```json
{
    'sym_variables': [('x1', 'number of reams of lined paper'), ('x2', 'number of reams of unlined paper')],
    'objective_function': '5*x1 + 3*x2',
    'constraints': ['2*x1 + x2 <= 400', '5*x1 + 2*x2 <= 400', 'x1 >= 0', 'x2 >= 0']
}
```

To solve this problem using Gurobi in Python, we use the following code:

```python
from gurobipy import *

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

# Create variables
x1 = m.addVar(vtype=GRB.CONTINUOUS, name="lined_paper")
x2 = m.addVar(vtype=GRB.CONTINUOUS, name="unlined_paper")

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

# Add constraints
m.addConstr(2*x1 + x2 <= 400, "printing_machine")
m.addConstr(5*x1 + 2*x2 <= 400, "scanning_machine")
m.addConstr(x1 >= 0, "non_negative_lined")
m.addConstr(x2 >= 0, "non_negative_unlined")

# Optimize model
m.optimize()

# Print solution
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Lined paper: {x1.x} reams")
    print(f"Unlined paper: {x2.x} reams")
    print(f"Maximum profit: ${m.objVal}")
else:
    print("No optimal solution found")
```