\(m_{Mg}=1,2\left(g\right)\)
=> \(n_{Mg}=\dfrac{1,2}{24}=0,05\left(mol\right)\)
\(n_{H_2}=\dfrac{2,24}{22,4}=0,1\left(mol\right)\)
PTHH: Mg + 2HCl --> MgCl2 + H2
____0,05--------------------->0,05
2Al + 6HCl --> 2AlCl3 + 3H2
\(\dfrac{1}{30}\)<--------------------0,05
=> \(m_{Al}=\dfrac{1}{30}.27=0,9\left(g\right)\)
=> \(\left\{{}\begin{matrix}\%Al=\dfrac{0,9}{0,9+1,2}.100\%=42,857\%\\\%Mg=\dfrac{1,2}{0,9+1,2}.100\%=57,143\%\end{matrix}\right.\)