Suppose all 36 are 8 legs.
36*8=288 legs
288-236= 52 more legs than the actual one.
Replace the hypothetical 36 8-legged-1 8-legged ones with 1 6-legged ones, and only subtract 2 legs.
52(8-6)= 26-6 legs
There are 36-26 crabs with 8 legs = 10.
Suppose all 26 hexapods are dragonflies.
26*2=52 pairs
More than the actual 52-40= 12 pairs.
There are 12 cicadas (2- 1) = 12 cicadas.
There are 26- 12= 14 dragonflies.
A: Crab 10, cicada 12, dragonfly 14.