To solve this problem, we first need to define the variables and the objective function. Let's denote the number of capsules A as \(x_A\) and the number of capsules B as \(x_B\). The objective is to minimize the total cost, which can be represented as \(2x_A + 3x_B\), given that the cost per capsule A is $2 and the cost per capsule B is $3.

The constraints based on the minimum requirements for the new product are:

1. Targeted medicine: \(2x_A + 3x_B \geq 20\)
2. Pain reliever: \(3x_A + 1x_B \geq 20\)
3. Filler: \(1x_A + 3x_B \geq 15\)

Additionally, \(x_A\) and \(x_B\) must be non-negative since we cannot produce a negative number of capsules.

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

```python
from gurobipy import *

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

# Define variables
x_A = m.addVar(name="Capsule_A", vtype=GRB.CONTINUOUS, lb=0)
x_B = m.addVar(name="Capsule_B", vtype=GRB.CONTINUOUS, lb=0)

# Set objective function
m.setObjective(2*x_A + 3*x_B, GRB.MINIMIZE)

# Add constraints
m.addConstr(2*x_A + 3*x_B >= 20, name="Targeted_Medicine")
m.addConstr(3*x_A + 1*x_B >= 20, name="Pain_Reliever")
m.addConstr(1*x_A + 3*x_B >= 15, name="Filler")

# Optimize model
m.optimize()

# Print results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Capsule A: {x_A.x}")
    print(f"Capsule B: {x_B.x}")
    print(f"Total Cost: ${2*x_A.x + 3*x_B.x:.2f}")
else:
    print("No optimal solution found")

```