。
Whenever he was in trouble, she helped him.
Literal
She [topic-は] he [subject-が] is-troubled [time-時] [topic+ever-はいつでも] he [object-を] helped.
~時はいつでも ('whenever') combines temporal とき with the inclusive 'any time' いつでも and a topical は. The embedded clause 彼が困っている uses ~ている for an ongoing state of being troubled. A neat illustration of how Japanese builds 'whenever' compositionally rather than from a single conjunction.