、。
We just barely caught the last train.
Literal
We [topic-は], risky place [at-で] last-train [on-に] was-in-time.
きわどいところ literally 'a risky/close place' = 'at the cut-off, barely.' で marks the metaphorical spot where the action happened — 'at the brink.' 終電車 ('last train [of the day]') is compact — 終 ('last, end') + 電車 ('train'). A common urban scenario in Japan where missing the last train is a genuine problem.