To solve this optimization problem, we will first define the decision variables and the objective function. Let's denote the number of blankets to be made as \(B\) and the number of bedsheets to be made as \(S\).

The profit per blanket is $24, and the profit per bedsheet is $21. Therefore, the total profit can be represented by the equation:
\[ \text{Total Profit} = 24B + 21S \]

This will be our objective function, which we aim to maximize.

Next, we need to consider the constraints based on the time available for cutting and hemming. Each blanket takes 14 minutes to cut and 12 minutes to hem, while each bedsheet takes 17 minutes to cut and 14 minutes to hem. There are 2000 minutes available for cutting and 1500 minutes available for hemming.

Thus, our constraints can be represented as follows:
1. Cutting time constraint: \(14B + 17S \leq 2000\)
2. Hemming time constraint: \(12B + 14S \leq 1500\)

Additionally, we have non-negativity constraints since the number of blankets and bedsheets cannot be negative:
\[ B \geq 0, S \geq 0 \]

We will use Gurobi in Python to solve this linear programming problem.

```python
from gurobipy import *

# Create a model
m = Model("Blankets_and_Bedsheets")

# Define decision variables
B = m.addVar(vtype=GRB.CONTINUOUS, name="Blankets", lb=0)
S = m.addVar(vtype=GRB.CONTINUOUS, name="Bedsheets", lb=0)

# Set the objective function to maximize profit
m.setObjective(24*B + 21*S, GRB.MAXIMIZE)

# Add constraints for cutting and hemming time
m.addConstr(14*B + 17*S <= 2000, "Cutting_Time")
m.addConstr(12*B + 14*S <= 1500, "Hemming_Time")

# Optimize the model
m.optimize()

# Print results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Number of Blankets: {B.x}")
    print(f"Number of Bedsheets: {S.x}")
    print(f"Total Profit: ${24*B.x + 21*S.x:.2f}")
else:
    print("No optimal solution found")
```