Let's compare chicken costs:
$3.19 * 6 = $19.14 (far store)
$3.39 * 6 = $20.34 (near store)
Now let's look at how much it costs to travel in your car:
$3.78/g / 20m/g → $3.78/20m = $0.189 per mile
Next, let's look how much it costs to travel to each store from the gas used. Multiply by 2 because you not only have to drive there, but also back home for the round trip:
8.7 miles * 2 = 17.4 miles
2.3 miles * 2 = 2.6 miles
Now to find the cost of gas for the respective trips:
$.189/mi * 17.4 mi = $3.2886 → $3.29
$.189/mi * 2.6 mi = $0.4914 → $0.49
We can just eyeball it from here that it's not worth it to travel, but for completion's sake, let's add the gas and chicken costs together:
$19.14 + $3.19 = $22.33 to the far store
$20.34 + $0.49 = $20.83 to the near store