PTHH: \(Mg+2HCl\rightarrow MgCl_2+H_2\) (1)
\(2Al+6HCl\rightarrow2AlCl_3+3H_2\) (2)
\(Al+NaOH+H_2O\rightarrow NaAlO_2+\frac{3}{2}H_2\) (3)
Ta có: \(\left\{{}\begin{matrix}n_{H_2\left(1\right)}+n_{H_2\left(2\right)}=\frac{8,96}{22,4}=0,4\left(mol\right)\\n_{H_2\left(3\right)}=\frac{6,72}{22,4}=0,3\left(mol\right)\end{matrix}\right.\) \(\Rightarrow\left\{{}\begin{matrix}n_{Al}=0,2mol\\n_{Mg}=0,1mol\end{matrix}\right.\)
\(\Rightarrow\left\{{}\begin{matrix}m_{Al}=0,2\cdot27=5,4\left(g\right)\\m_{Mg}=0,1\cdot24=2,4\left(g\right)\end{matrix}\right.\) \(\Rightarrow\left\{{}\begin{matrix}\%m_{Al}=\frac{5,4}{5,4+2,4}\cdot100\%\approx69,23\%\\\%m_{Mg}\approx30,77\%\end{matrix}\right.\)