Đặt \(n_{Al}=x\left(mol\right);n_{Mg}=y\left(mol\right)\)
\(n_{H_2}=\dfrac{8,96}{22,4}=0,4\left(mol\right)\)
\(PTHH:2Al+6HCl\rightarrow2AlCl_3+3H_2\uparrow\\ Mg+2HCl\rightarrow MgCl_2+H_2\uparrow\)
Theo đề ta có: \(\left\{{}\begin{matrix}27x+24y=7,8\\\dfrac{3}{2}x+y=0,4\end{matrix}\right.\Rightarrow\left\{{}\begin{matrix}x=0,2\\y=0,1\end{matrix}\right.\)
\(\Rightarrow\left\{{}\begin{matrix}\%_{Al}=\dfrac{0,2\cdot27}{7,8}\cdot100\%\approx69,23\%\\\%_{Mg}=\dfrac{0,1\cdot24}{7,8}\cdot100\%\approx30,77\%\end{matrix}\right.\)