The electron configuration ofthe atom is 1s2 2s2 2p6 3s2. Upon forming an ion, its new configuration is 1s2 2s2 2p6.
The atom has lost two electrons to form an ion which is positively charged with a charge of +2.
In the given electronic configuration of an atom, '3s' shell is the outermost shell in which two electrons are present. For the stable configuration, these two electrons will be lost easily from the outer shell and atom will carry (+2).
The atom has 12 electrons, and looses 2 electrons to attain stable configuration forming a positively charged ion with 10 electrons.