Alkaline earth metals are the elements that make up group 2 of the Periodic Table. Like Be, Mg, Ca, Sr, Ba and Ra.
a) Let's do the electronic distribution of two elements of group 2:
Mg atomic number is 12
Ca atomic number is 20
Eletronic distribution:
Mg - 1s² 2s² 2p⁶ 3s²
Ca - 1s² 2s² 2p⁶ 3s² 3p⁶ 4s²
Valence shell is marked on the electronic distribution. It means that both have 2 electrons in the valence shell.
b) To predict the ionic charge of the ion, we need to lose or gain electrons in order to obtain 8 electrons in the valence shell. So for alkaline earth metals, they need to lose 2 electrons in order to obtain 8 electrons in the valence shell:
Mg - 1s² 2s² 2p⁶ 3s²
Loses 2 electrons:
Mg²⁺ - 1s² 2s² 2p⁶ - 8 electrons in the valence shell
So, the ionic charge of the ion that alkaline earth metals form is 2+.