The correct option is
B more ionisation potential
Going down Group 2:
• There are more filled energy levels between the nucleus and the outer electron; this shields the outer electron from the attraction of the nucleus
• The radius of the atom increases, so the distance between the nucleus and the outer electron increases
• Therefore the force of attraction between the nucleus and outer electron is reduced
• So less energy is needed to remove the outer electron.
As the number of protons in the nucleus increases going down Group 2, you might expect the first ionization energy to increase because of the nuclear charge increases. This does not happen, because the factors described above have a greater influence on the value of the first ionization energy
So, In a group from top to bottom, the Ionization Potential of the elements decreases.
So Be has more ionization potential when compared to Mg