Mg+2HCl--->MgCl2+H2
x------------------------------x
2Al+6HCl----->2AlCl3+3H2
y--------------------------------1,5y
n H2=4,368/22,4=0,195(mol)
Theo bài ta có hpt
\(\left\{{}\begin{matrix}24x+27y=3,87\\x+1,5y=0,195\end{matrix}\right.\Rightarrow\left\{{}\begin{matrix}x=0,06\\y=0,09\end{matrix}\right.\)
m Mg=0,06.24=1,44(g)
m Al=3,87-1,44=2,43(g)