When the magnesium metal is burned in the air, it produces two products A and B. A reacts with the water to produce a basic solution and B reacts with the water to produce a similar solution as that of A plus a gas with a pungent odor. Find out A and B and write down the equations for the reactions.