The sentence "when it is raining, peacocks dance" is a plain if-then rule: raining leads to dancing. It does not say dancing only happens because of rain, and it does not say anything directly about what happens when it stops raining. To find what must be true, we test each option against this rule.
Only the third option follows directly from the original rule without adding any new assumption, so it is the one that is necessarily true.
Let's summarize:
So the correct option is "When peacocks are not dancing, it is not raining."