There are two bags of stones labelled A and B. In Bag A, there are 26 black stones and 20 white stones. In Bag B, there are 39 black stones and 30 white stones. How many black and white stones should be transferred from Bag B to Bag A such that 60% of the stones in Bag A and 50% of those in Bag B are black?
\(\begin{array}{r|c|l} & black & white \\ \hline A & 26 & 20 \\ \hline B & 39 & 30 \\ \hline sum & 65 & 50 \end{array}\)
\(\begin{array}{r|c|l} & black & white \\ \hline A & 26 +x & 20 + y \\ \hline B & 39-x & 30-y \\ \hline sum & 65 & 50 \end{array}\)
\(\begin{array}{rcl} [(39-x)+(30-y)]\cdot 50\% &=& 39-x \\ (39-x)\cdot 0.5 +(30-y)\cdot 0.5 &=& 39-x \\ (39-x)\cdot(1- 0.5) &=& (30-y)\cdot 0.5 \\ (39-x)\cdot 0.5 &=& (30-y)\cdot 0.5 \\ 39-x &=& 30-y \\ 30-y &=& 39-x\\ x &=& 39-30+y \\ \mathbf{x} & \mathbf{=} & \mathbf{9 + y} \end{array}\)
\(\begin{array}{rcl} [(26+x)+(20+y)]\cdot 60\% &=& 26+x \\ (26+x)\cdot 0.6 +(20+y)\cdot 0.6 &=& 26+x \\ (26+x)\cdot(1- 0.6) &=& (20+y)\cdot 0.6 \\ (26+x)\cdot 0.4 &=& (20+y)\cdot 0.6 \\ 26+x &=& (20+y )\cdot \frac32 \qquad | \qquad x = 9+y\\ 26+9+y &=& (20+y )\cdot \frac32 \\ 35+y &=& (20+y )\cdot \frac32 \\ 35+y &=& 30 +y \cdot \frac32 \\ y \cdot \frac32-y &=&35-30\\ y\cdot \frac12 &=& 5\\ \mathbf{y} & \mathbf{=} & \mathbf{10}\\ \\ \hline \\ x &=& 9 + y\\ x &=& 9 +10 \\ \mathbf{x} & \mathbf{=} & \mathbf{19}\\ \end{array}\)
\(\begin{array}{r|c|l} & black & white \\ \hline A & 26 +19 = \color{red}{45}& 20 + 10 = \color{red}{30}\\ \hline B & 39-19 = \color{red}{20} & 30-10 = \color{red}{20}\\ \hline sum & 65 & 50 \end{array}\)
60 % of (45+30=75) is 45 okay!
50 % of (20+20=40) is 20 okay!