。
The train left before they arrived at the station.
Literal
Train [topic-は] they [subject-が] station [at-に] arrive before left-completely.
出てしまった combines 出る ('leave, go out') with the completive ~てしまう, producing the 'already left, and it's too late now' nuance — regret or finality. Inside the relative-clause-like 前に structure, 彼らが駅へ着く takes が for its internal subject (not は) — a standard distinction: subordinate clauses typically use が for their internal subject, not は.