Verified Answer :

Are those the answers 
 hah because i got a little confused 

Answer: Magnesium atom looses 2 electrons to obtain the noble gas structure.

Explanation:

Atomic number of magnesium is 12. Electronic configuration of magnesium :

\([Mg]=1s^22s^22p^63s^2\)

In the periodic table, the nearest noble gas to magnesium element is Neon with atomic number 10.

\([Ne]=1s^22s^22p^6\)

So, in order to obtain noble gas electronic configuration the magnesium atom will loose 2 electrons.

\([Mg^{2+}]=1s^22s^22p^6\)