Answer: খ. 8
Let ducks = d, goats = g. Ducks have 2 legs, goats 4; every animal has 1 head.
\(2d + 4g = 2(d + g) + 16 \;\Rightarrow\; 2g = 16 \;\Rightarrow\; g = 8\)
Shortcut: "twice the heads" counts 2 legs for every animal; the extra 16 legs come only from goats, 2 extra each, so 16 ÷ 2 = 8 goats. The number of ducks does not matter.
— rhs