Uber and Lyft agreed to pay a combined $328 million to settle allegations the ride-hailing companies unlawfully withheld wages from drivers and failed to provide mandatory paid sick leave in New York state, Attorney General Letitia James’ office said Thursday.