To solve this optimization problem, we first need to define the decision variables and the objective function. Let's denote the number of printed arts as \(x\) and the number of paintings as \(y\). The profit per printed art is $5, and the profit per painting is $8. Thus, the total profit can be represented by the objective function: \(5x + 8y\).

The constraints are based on the time available for printing and framing:
1. Printing time constraint: Each printed art takes 10 minutes for printing, so \(10x\) represents the total printing time used by printed arts. Since paintings take 0 minutes for printing, the total printing time used is \(10x\), which must not exceed 150 minutes.
2. Framing time constraint: Each printed art takes 5 minutes for framing, and each painting takes 15 minutes for framing. Therefore, the total framing time used is \(5x + 15y\), which must not exceed 400 minutes.

Additionally, we have non-negativity constraints since the company cannot produce a negative number of items: \(x \geq 0\) and \(y \geq 0\).

The optimization problem can be formulated as follows:
- Maximize: \(5x + 8y\)
- Subject to:
  - \(10x \leq 150\)
  - \(5x + 15y \leq 400\)
  - \(x \geq 0\)
  - \(y \geq 0\)

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

```python
from gurobipy import *

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

# Define the decision variables
x = m.addVar(vtype=GRB.CONTINUOUS, name="printed_arts", lb=0)
y = m.addVar(vtype=GRB.CONTINUOUS, name="paintings", lb=0)

# Set the objective function
m.setObjective(5*x + 8*y, GRB.MAXIMIZE)

# Add constraints
m.addConstr(10*x <= 150, "printing_time")
m.addConstr(5*x + 15*y <= 400, "framing_time")

# Optimize model
m.optimize()

# Print solution
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Number of printed arts: {x.x}")
    print(f"Number of paintings: {y.x}")
    print(f"Maximum profit: ${5*x.x + 8*y.x:.2f}")
else:
    print("No optimal solution found")
```