Explanation:
from the equation we know that 500g of Mgcl are produced.
but we also know that 83g of Mgcl will give 2g of hydrogen
therefore, 500g of Mgcl will give x g of hydrogen
x=
500*2/83g = 12.04g
if you have not yet understood just leave a message