The correct option is A Mg+H2O
Alkali and alkaline earth metals react with water to produce hydrogen gas and metal hydroxides. This is due to their high electropositive character.
Mg+2H2O⟶Mg(OH)2+H2
BaO2+2HCl→BaCl2+H2O2
Na2O2+2HCl→2NaCl+H2O2
H2S2O8+2H2O→H2O2+2H2SO4
Hence, only reaction (a) liberates hydrogen gas.