Now use the mass balance equations for each phase:
In every place where there is a term for the mass in the bottom phase, substitute the Equations 1 and 2
that were just obtained in the above math. In other words for the following equations, Equation 3 gets this substitution to result in Equation 5 while Equation 4 leads to Equation 6.
Cross multipication of Equation 6 gives Equation 7 that is solved to get Equation 8. Combining Equations 5 and 8 gives Equation 9 that has only At1 as the unknown. You should need no help in collecting terms to find the sole unknown. When you specify the input mass to the process, the distribution coefficient, and the volume of solvent, these equations calculate the masses in each phase of each stage.