Calculates how much each person owes someone.