San Francisco area commuters breathed a sigh of relief over the last-minute contract settlement that averted a strike that could have meant commuter chaos for thousands of Bay Area Rapid Transit train riders. A union official said that “both sides are very pleased and relieved, and I’m sure the public is thrilled.” The key money issue was whether BART or its employees should benefit from an estimated $10-million-a-year windfall from investments from the state-operated Public Employees Retirement System, to which BART contributes. The old contract required turnover of profits to the workers, but in BART’s final offer last week, the district said it wanted two-thirds of the money to go toward operations. BART faces a $4.8-million deficit this year. The tentative agreement reportedly calls for the profits to be used for three years to finance medical insurance for retired employees. The union agreed that members would also pay $15 a month toward the retirees’ benefits.