<u>Answer:</u> The chemical formula for the given compound is 
<u>Explanation:</u>
Magnesium is the 12th element of the periodic table having electronic configuration of ![[Ne]3s^2](https://tex.z-dn.net/?f=%5BNe%5D3s%5E2)
This element will loose 2 electrons and form an oxidation state of +2 units.
Nitrogen is the 7th element of the periodic table having electronic configuration of ![[He]2s^22p^3](https://tex.z-dn.net/?f=%5BHe%5D2s%5E22p%5E3)
This element requires 3 electrons and thus shows an oxidation state of -3 units.
By criss-cross method, the oxidation state of the ions gets exchanged and this form the subscripts of the other ions. It results in the formation of a neutral compound.
Thus, the chemical formula for the given compound is 