This type of calculation is typically covered in an Analytical Chemistry course in the book chapter "Analytical Separations, separation by extraction". There is a page or two algebra workup in the book that I have (Ch 24, Analytical Chemistry: An Introduction, 5th ed, Skoog, Holler, West) followed by an example.