Magnesium reacts with an element (X) to form an ionic compound. If the ground state electronic configuration of (X) is 1s2 2s2 2p3, the simplest formula for this compound is
Mg2X3
MgX2
Mg3X2
Mg2X
C.
Mg3X2
Element (X) electronic configuration
1s2 2s2 2p3
So, valency of X will be 3.
Valency of Mg is 2.
Formula of the compound formed by Mg and X
will be Mg3X2