After the showers drain the tank, the burner goes to work. Recovery rate - gallons per hour reheated - decides whether the third shower arrives hot or acceptable.
Water Heater Recovery Rate Calculator turns input rating, efficiency and temperature rise into a real recovery number.