Step 1: Identify the parasite by its nicknames - $hydatid\ worm$ and $dog\ tapeworm$ - which already point to its principal animal.
Step 2: In its life cycle the adult worm needs a carnivore gut. For $E.\ granulosus$ that definitive host is the domestic dog, which then contaminates pasture with eggs.
Step 3: Grazing animals like sheep swallow the eggs and grow hydatid cysts; humans get the same cysts accidentally, classically in liver and lung.
Step 4: Eliminate the rest - the cat is not the standard host, the fox is the reservoir for the related $E.\ multilocularis$, and the pig is an intermediate host for Taenia rather than the definitive host wanted here.
\[\boxed{\text{Dog}}\]