This is an oxidation-reduction (redox) reaction:
2 HI + 2 e- → 2 H0 (reduction)
O-IV - 2 e- → O-II (oxidation)
MgH2O is an oxidizing agent, MgH2O is a reducing agent.
Reactants:
Products: