This answer is incorrect.
"was leaving" indicated that this
was a simultaneous event--that the two things happened at the same time.
However, the word "after" indicates
that one event happened after the other.
The correct answer is
The train derailed after it had
left the DeKalb Street station.
(It would also be possible to say...
The train derailed after it left
the DeKalb Street station.
...in informal speech.)