Complex sentence: The agent kills one of them; when he is about to shoot another, Stan arrives to help him.
Split into simpler sentences: The agent kills one of them. When he is about to shoot another, Stan arrives to help him.