\(n_{H_2}=\dfrac{4,368}{22,4}=0,195mol\)
\(\left\{{}\begin{matrix}n_{Al}=x\left(mol\right)\\n_{Mg}=y\left(mol\right)\end{matrix}\right.\Rightarrow27x+24y=3,87\left(1\right)\)
\(2Al+6HCl\rightarrow2AlCl_3+3H_2\)
\(Mg+2HCl\rightarrow MgCl_2+H_2\)
\(\Rightarrow1,5x+y=0,195\left(2\right)\)
Từ (1) và (2) \(\Rightarrow\left\{{}\begin{matrix}x=0,09\\y=0,06\end{matrix}\right.\)
\(m_{Al}=0,09\cdot27=2,43g\)
\(m_{Mg}=0,06\cdot24=1,44g\)