a)
Ta có : $n_{H_2} = 0,195(mol) ; n_{HCl} = 0,25(mol) ; n_{H_2SO_4} = 0,125(mol)$
$Mg + 2HCl \to MgCl_2 + H_2$
$2Al + 6HCl \to 2AlCl_3 + 3H_2$
$Mg + H_2SO_4 \to MgSO_4 + H_2$
$2Al + 3H_2SO_4 \to Al_2(SO_4)_3 + 3H_2$
Theo PTHH :
$n_{H_2} = \dfrac{1}{2}n_{HCl} + n_{H_2SO_4} = 0,25> 0,195$
Do đó, axit còn dư
b) Gọi $n_{Mg} = a(mol) ; n_{Al} = b(mol) \Rightarrow 24a + 27b = 3,87(1)$
Theo PTHH :
$n_{H_2} = a + 1,5b = 0,195(2)$
Từ (1)(2) suy ra a = 0,06 ; b = 0,09
$\%m_{Mg} = \dfrac{0,06.24}{3,87}.100\% = 37,21\%$
$\%m_{Al} = 100\% - 37,21\% = 62,79\%$