Ответ:

They were waiting for the bus when they saw the accident.