To solve this problem, we first need to define the decision variables and the objective function. Let's denote the number of Pill A to be purchased as `x` and the number of Pill B to be purchased as `y`. The objective is to minimize the total cost, which can be represented as `3x + 5y`.

We also have constraints based on the requirements for muscle relaxant, anxiety medication, and pain reliever:
- Muscle relaxant: `2x + 5y >= 30`
- Anxiety medication: `3x + y >= 15`
- Pain reliever: `4x + 3y >= 20`

Additionally, since we cannot buy a negative number of pills, we have non-negativity constraints:
- `x >= 0`
- `y >= 0`

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

```python
from gurobipy import *

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

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

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

# Add constraints
m.addConstr(2*x + 5*y >= 30, "Muscle_Relaxant")
m.addConstr(3*x + y >= 15, "Anxiety_Medication")
m.addConstr(4*x + 3*y >= 20, "Pain_Reliever")

# Optimize the model
m.optimize()

# Print the results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Pill A: {x.x}")
    print(f"Pill B: {y.x}")
    print(f"Total Cost: {m.objVal}")
else:
    print("No optimal solution found")
```