## Problem Description and Formulation

The dog owner wants to minimize the cost of mixing two types of dog food, Type A and Type B, while ensuring the new mixture contains at least 12 units of meat and 8 units of micronutrients.

## Define the Variables

Let \(x_A\) be the amount of Type A food in kg and \(x_B\) be the amount of Type B food in kg.

## Objective Function

The objective is to minimize the total cost, which is given by \(2x_A + 5x_B\).

## Constraints

1. **Meat Constraint**: The mixture must contain at least 12 units of meat. Since Type A food contains 1 unit of meat per kg and Type B food contains 3 units of meat per kg, this constraint can be written as \(x_A + 3x_B \geq 12\).
2. **Micronutrients Constraint**: The mixture must contain at least 8 units of micronutrients. Since Type A food contains 2 units of micronutrients per kg and Type B food contains 1 unit of micronutrients per kg, this constraint can be written as \(2x_A + x_B \geq 8\).
3. **Non-Negativity Constraints**: The amounts of Type A and Type B food cannot be negative, so \(x_A \geq 0\) and \(x_B \geq 0\).

## Gurobi Code

```python
import gurobi

def solve_dog_food_problem():
    # Create a new model
    model = gurobi.Model()

    # Define the variables
    x_A = model.addVar(lb=0, name="Type_A_food")
    x_B = model.addVar(lb=0, name="Type_B_food")

    # Define the objective function
    model.setObjective(2 * x_A + 5 * x_B, gurobi.GRB.MINIMIZE)

    # Add the constraints
    model.addConstr(x_A + 3 * x_B >= 12, name="meat_constraint")
    model.addConstr(2 * x_A + x_B >= 8, name="micronutrients_constraint")

    # Optimize the model
    model.optimize()

    # Print the solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal cost: {model.objVal}")
        print(f"Type A food: {x_A.x}, Type B food: {x_B.x}")
    else:
        print("The problem is infeasible")

solve_dog_food_problem()
```