The future value for one installment is given by FV=PV (1+r) n and FV= A*[(1+r) n -1]/r for continuous deposits. Where FV is the future value, PV is the principle value, r is the interest rate, and n is the number of contributions.
Beth earns more because of the Time Value of Money. That is, the value of money today is higher than the same amount tomorrow. Alternatively, the value of money today was lower than the same amount yesterday. Therefore, Beth’s money has a higher value than Larry’s since she began depositing twelve years before him. Besides, the compounding interest adds more value to Beth’s investment since the value compounded by the time Larry began investing was significantly higher. That is why Beth’s was able to save more money, even though her contributions are almost a third of Larry.