a)
$Zn + H_2SO_4 \to ZnSO_4 + H_2$
$Mg + H_2SO_4 \to MgSO_4 + H_2$
b)
Gọi $n_{Zn} = a(mol) ; n_{Mg} = b(mol) \Rightarrow 65a + 24b = 19,85(1)$
Theo PTHH :
$n_{H_2} = a + b = \dfrac{8,96}{22,4} = 0,4(2)$
Từ (1)(2) suy ra : a = 0,25 ; b = 0,15
$\%m_{Zn} = \dfrac{0,25.65}{19,85}.100\% = 81,9\%$
$\%m_{Mg} = 100\% - 81,9\% = 18,1\%$