You are confusing transport costs with production costs. The 3 actions required to invent food are not a transport cost, but a production cost.
Yes! This makes sense. The 3 action points spent "foraging for food" are not a transportation cost, and thus are counted in addition to the transportation cost for the sword.