Dear student
a. The valence electron is an outer shell electron that can participate in the formation of a chemical bond.
Na = 2 8 1, valence electron is 1.
Na+ = 2 8. valence electron is 8.
O = 2 6. valence electron is 6.
O2- = 2 8, valence electron is 8.
B.The element E can be Mg, Ca etc because of these metals show +2 oxidation state. They form the metal oxide with oxygen like MgO, CaO etc.
Regards