I'm struggling with the following problem.
Problem
There are $3$ alloys of nickel and zinc, their total mass is $30$ kg. The first alloy contains $40\%$ of nickel, the second one - $22\%$ of nickel, the third one - $90\%$ of nickel.
If we melt the first and the second alloys together, the resulting alloy will contain $30\%$ of nickel, and if we melt the first and the third alloys together, the resulting alloy will contain $30\%$ of zinc.
Find the mass of each of the three alloys.
Solution (well, sort of)
So far I've done the following:
Let $a_1, a_2, a_3$ be the mass of nickel in each alloy,
let $b_1, b_2, b_3$ be the mass of zinc in each alloy.
Then we have:
$\dfrac{a_{1}}{a_{1}+b_{1}}=0.4\Leftrightarrow a_{1}=0.4\left(a_{1}+b_{1}\right)\Leftrightarrow0.6a_{1}=0.4b_{1}\Leftrightarrow3a_{1}=2b_{1}$
$\dfrac{a_{2}}{a_{2}+b_{2}}=0.22\Leftrightarrow a_{2}=0.22\left(a_{2}+b_{2}\right)\Leftrightarrow0.78a_{2}=0.22b_{2}\Leftrightarrow39a_{2}=11b_{2}$
$\dfrac{a_{3}}{a_{3}+b_{3}}=0.9\Leftrightarrow a_{3}=0.9\left(a_{3}+b_{3}\right)\Leftrightarrow0.1a_{3}=0.9b_{3}\Leftrightarrow a_{3}=9b_{3}$
$\dfrac{a_{1}+a_{2}}{a_{1}+b_{1}+a_{2}+b_{2}}=0.3\Leftrightarrow a_{1}+a_{2}=0.3\left(a_{1}+b_{1}+a_{2}+b_{2}\right)=0.7\left(a_{1}+a_{2}\right)=0.3\left(b_{1}+b_{2}\right)$
$\dfrac{b_{1}+b_{3}}{a_{1}+b_{1}+a_{3}+b_{3}}=0.3\Leftrightarrow b_{1}+b_{3}=0.3\left(a_{1}+b_{1}+a_{3}+b_{3}\right)=0.7\left(b_{1}+b_{3}\right)=0.3\left(a_{1}+a_{3}\right)$
Honesty, I don't know whether I'm on the right track and if yes, where I go further from here. I'd like to ask for help. I appreciate any recommendation.
It turns out that life is simpler here: $ \begin{cases} x+y+z=30\\ 0.4x+0.22y=0.3\left(x+y\right)\\ 0.4x+0.9z=0.7(x+z) \end{cases}\ \Leftrightarrow\begin{cases} x=8\\ y=10\\ z=12 \end{cases} $