\(n_{H_2} = \dfrac{4,35-3,95}{2} = 0,2(mol)\\ Mg + 2HCl \to MgCl_2 + H_2\\ 2Al + 6HCl \to 2AlCl_3 + 3H_2\)
\(\left\{{}\begin{matrix}Mg:x\left(mol\right)\\Al:y\left(mol\right)\end{matrix}\right.\)→ \(\left\{{}\begin{matrix}24x+27y=4,35\\x+1,5y=0,2\end{matrix}\right.\)→\(\left\{{}\begin{matrix}x=0,125\\y=0,05\end{matrix}\right.\)
Vậy :
\(\%m_{Mg} = \dfrac{0,125.24}{4,35}.100\% = 68,97\%\\ \%m_{Al} = 100\% - 68,97\% = 31,03\%\)