Dear Student,
In 12Mg24,
12 is the atomic number i.e. number of protons (NOT number of electrons).
24 is the mass number. It is 12+12 (12 of protons and 12 of neutrons).
Mass of proton Mass of neutron
Mass of electrons is negligible. So, even doubling it does not affect the atomic mass significantly
So, if mass of neutron is halved, the mass of 12 neutrons = 6.
Then atomic mass will be 12 (proton mass) + 6 (neutron mass) = 18
Regards