To solve this optimization problem, we first need to define the decision variables and the objective function. Let's denote the number of books to be printed as \(B\) and the number of magazines to be printed as \(M\). The profit per book is $5, and the profit per magazine is $8. Thus, the total profit can be represented as \(5B + 8M\), which we aim to maximize.

The constraints are based on the available time for printing and binding:
1. Printing Time Constraint: Each book takes 10 minutes for printing, and each magazine takes 20 minutes for printing. The company has 5000 minutes available for printing. Therefore, the constraint can be represented as \(10B + 20M \leq 5000\).
2. Binding Time Constraint: Each book takes 5 minutes for binding, and each magazine takes 3 minutes for binding. The company has 2000 minutes available for binding. Thus, the constraint is \(5B + 3M \leq 2000\).

Additionally, we have non-negativity constraints since the number of books and magazines cannot be negative: \(B \geq 0\) and \(M \geq 0\).

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

```python
from gurobipy import *

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

# Define the decision variables
B = m.addVar(vtype=GRB.CONTINUOUS, name="Number_of_Books", lb=0)
M = m.addVar(vtype=GRB.CONTINUOUS, name="Number_of_Magazines", lb=0)

# Set the objective function to maximize profit
m.setObjective(5*B + 8*M, GRB.MAXIMIZE)

# Add constraints
m.addConstr(10*B + 20*M <= 5000, "Printing_Time_Constraint")
m.addConstr(5*B + 3*M <= 2000, "Binding_Time_Constraint")

# Optimize the model
m.optimize()

# Print the results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Number of Books: {B.x}")
    print(f"Number of Magazines: {M.x}")
    print(f"Maximum Profit: ${5*B.x + 8*M.x:.2f}")
else:
    print("No optimal solution found")
```