This is what you get for making a disordered SR problem in which the moving thing (the train) is stationary, and the stationary thing (the station) is moving.
I always suggest we follow a protocol:
Introduce the stationary (in our mind of course, we view buildings as stationary) first in a frame, $S$.
Now talk events in that frame: some lights flash--we'll get back to it
Intro the "moving" frame, $S'$. It's primed, it moves, it the train, and idk the direction: it moves forward. Avoid spurious coordinates.
It's pretty clear that if the front and back end lights flash simultaneously in $S'$, then the REAR light flashes 1st in $S$.
Since you set the problem up backwards, it's hard to do. I refuse to do an inverse Lorentz transform.
Rather I will introduce a third frame, $S''$, that is a plane flying at $-v'$ in $S'$ (oh, and always state the velocity...just out of courtesy --not the value, just the variable. Or else I have to do it).
So now forget about $S$ since $S=S''$, and drop a prime, so the train is stationary in $S$ and the plane ($S'$) is moving at $-v$ there.
I'm setting $c=L/2=1$. Now define events $(t, x)$ in $S$:
Front/Rear light flashes:
$$ E_{\pm} = (0, \pm L)$$
Now transform to the balloon frame (since the plane is stationary in the station frame, I changed it to a balloon...remember: you set the problem up backwards, not me):
$$ E'^{\pm} =
\Big(\gamma(t-(-v)(\pm L)), \gamma(\pm L-vt)\Big)
$$
allow care about is the time component
$$ E_t'^{\pm} = \pm\gamma L$$
showing that the rear light flashes first, so you're whole premiss was backwards, as was the set-up.
Now:
finish the LT, and define new events: (when, where) the light are are received in $S$. (The new $S$, which was the old $S'$).
Don't use "Eric". The 1st frame should be a 'A' name: Alice, then the moving frame's second name 'B' (Bob)--then (at least up to 17 hours ago), you could use pronouns to refer to them, so instead of "the observer riding in the center of the train", you just say "he", after Bob's initial intro.
So the Receive ($R^{\pm}_X$) events: figure them out and you'll find they're an it: since the whole problem stipulates that in $S$:
$$ R^+_X = R^-_X $$
you should be able to convince yourself that's true in all frames.
Relativity is confusing, and if you don't clarify your problem you will not make paradoxes, you'll make straight contradictions.