To solve the given problem using linear programming with Gurobi in Python, we first need to define the variables and the objective function. Let's denote:

- \(x_A\) as the number of bags of type A used,
- \(x_B\) as the number of bags of type B used.

The objective is to minimize the total cost, which can be represented as \(4x_A + 6x_B\), since each bag of type A costs $4 and each bag of type B costs $6.

We have two constraints based on the content requirements:
1. The mixture must contain at least 20 units of sardines: \(2x_A + 4x_B \geq 20\).
2. The mixture must contain at least 25 units of anchovies: \(3x_A + x_B \geq 25\).

Also, since we cannot have a negative number of bags, both \(x_A\) and \(x_B\) should be non-negative.

Here is the Gurobi code to solve this linear programming problem:

```python
from gurobipy import *

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

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

# Set the objective function to minimize cost
m.setObjective(4*x_A + 6*x_B, GRB.MINIMIZE)

# Add constraints for sardines and anchovies
m.addConstr(2*x_A + 4*x_B >= 20, name="Sardine_Requirement")
m.addConstr(3*x_A + x_B >= 25, name="Anchovy_Requirement")

# Optimize the model
m.optimize()

# Check if an optimal solution was found
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Number of Bag A: {x_A.x}")
    print(f"Number of Bag B: {x_B.x}")
    print(f"Total Cost: ${m.objVal}")
else:
    print("No optimal solution found")
```