\(n_{X_2}=\dfrac{m}{2.M_X}\left(mol\right)\)
PTHH: Mg + X2 --> MgX2
\(\dfrac{m}{2.M_X}\)-->\(\dfrac{m}{2.M_X}\)
2Al + 3X2 --> 2AlX3
\(\dfrac{m}{2.M_X}\)->\(\dfrac{m}{3.M_X}\)
=> \(\left\{{}\begin{matrix}\dfrac{m}{2.M_X}\left(24+2.M_X\right)=19\\\dfrac{m}{3.M_X}\left(27+3.M_X\right)=17,8\end{matrix}\right.\)
=> MX = 35,5 (g/mol)
=> X là Cl