Calculate the mass of Magnesium that will be liberated from its salt by the same…