The first ionisation potentials of Na, Al & Mg are in the order
Na<Mg<Al
Al<Mg<Na
Na<Al<Mg
Mg<Al<Na
Mg has greater ionisation energy than Al due to configuration. It is more difficult to remove electrons from 3s orbital than for 3p orbital since s-orbitals have greater penetration power.
Na has very low ionization energy compared to Mg and Al , due to Na+ very stable.