\(n_{C_2H_2}=a\left(mol\right),n_{CH_4}=b\left(mol\right)\)
\(n_C=\dfrac{6}{12}=0.5\left(mol\right)\)
\(\Rightarrow2a+b=0.5\left(1\right)\)
\(n_H=0.8\left(mol\right)\)
\(\Rightarrow2a+4b=0.8\left(2\right)\)
\(\left(1\right),\left(2\right):a=0.2,b=0.1\)
\(\%m_{C_2H_2}=\dfrac{0.2\cdot26}{0.2\cdot26+0.1\cdot16}\cdot100\%=76.47\%\)
\(\%m_{CH_4}=100\%-76.47\%=23.53\%\)