\(n_{Ca^{2+}}=0.1\cdot0.4=0.04\left(mol\right),n_{Ba^{2+}}=0.1\cdot0.2=0.02\left(mol\right)\)
\(n_{CO_3^{2-}}=0.2\cdot0.3+0.2\cdot0.1=0.08\left(mol\right)\)
\(Ca^{2+}+CO_3^{2-}\rightarrow CaCO_3\)
\(0.04.......0.04.......0.04\)
\(Ba^{2+}+CO_3^{2-}\rightarrow BaCO_3\)
\(0.02.......0.02.......0.02\)
\(m_{\downarrow}=0.04\cdot100+0.02\cdot197=7.94\left(g\right)\)