This is 'Janus' train

Let
A1: Front Mark
A2: Bow of the Train, Front
B1: Rear Mark
B2: Aft of the Train, Back
M: Mid point between A1 and B1
D: Distance between A1 and M, let say D = 1.6 Light second
E: Distance between A1 and B1 = 2 * D = 3.2 lt
V: Velocity of the railway = 0.6c
L: is the length of the train = ...??
Yes! The railway is moving. The train stops. I don't know if this makes sense in real world.
Everything is in Train Frame.
Okay...
WHEN A2 meets A1, the train bow flashes a signal
Let V
a = c-V = 0.4c
T
a = D/V
a = 4 sec
The signal will reach M in 4 sec
WHEN B2 meets B1, the train aft flashes a signal
Let V
b = c+V = 1.6c
T
b = D/V
b = 1 sec
So B2 shouldn't meet B1 at the same time A2 meets A1, right? There's simultaneity different here

In fact B2 should 'wait' for 3 seconds or the length of the train should be longer than A1-B1, there's length contraction here

Additional train length is 3 seconds * V
So
L = 3 seconds * V + E
##L = (T_a - T_b)V + E##
##L = (\frac{D}{c-V}-\frac{D}{c+V})*V+E##
##L = (\frac{Dc+DV-(Dc-DV)}{c^2-V^2})*V+E##
##L = (\frac{2DV}{c^2-V^2})*V+E##
##E = 2D##, so
##L = (\frac{EV^2}{c^2-V^2})+E##
If we substitute C with 1 and V is a factor of C, so
##L = (\frac{EV^2}{1-V^2})+E##
##\frac{L}{E} = (\frac{V^2}{1-V^2})+1##
##\frac{L}{E} = (\frac{1}{1-V^2})##
So, the railway length is 3.2 lt and the train length is 5 lt for V = 0.6c
That way, 5 lt - 3.2 lt =1.8 lt
If V = 0.6 then, it takes 3 seconds for the back of the train to reach 1.8 lt. And flashes a signal which hit M at the same time the bow signal hits M
It makes sense,
But...
Why
##\gamma = \frac{1}{\sqrt{1-V^2}}##?
not this one
##\text{ratio} = \frac{1}{1-V^2}##
Do I mistakenly make the equation?
But if Lorentz is right, WHICH I KNOW HE IS!, the length of the train will be 4 lt not 5 lt. Doesn't make sense in real world. Or it does?