Mg+H2O→A+H2
A+H2O→B
Identify A and B.
A→MgO
B→Mg(OH)2
We know that when metals react with water hydrogen gas is liberated along with the formation of metal hydroxide. The reaction takes place in two steps.
Mg+H2O→MgO+H2
MgO+H2O→Mg(OH)2
A→MgO
B→Mg(OH)2