The correct option is D -2
Oxygen has 8 electrons and its electronic configuration can be written as 2,6. Thus Oxygen has 6 electrons in its outermost orbit or it can be said that Oxygen has 6 valence electrons. Oxygen wants to take two more electrons in its outermost orbit to complete its octet by attaining the electronic configuration of its nearest inert gas Neon. Thus, Oxygen takes two more electrons from its neighboring Calcium atom in CaO.
Oxygen after taking two more electrons in its outermost orbit, now has 10 electrons, and hence its oxidation number is −2.