The correct option is B Magnesium and oxygen
Neon and argon are inert elements. So they won't react.
Also, an ionic compound is always formed between a metal and a non-metal. Among the given options, only magnesium and oxygen is a metal and a non-metal pair. Therefore, they will form ionic bond.