Then how do you suppose how they would then travel at the same speed, but then arrive at the front and back of the train at different times from the opposite end of the train?
Just consider the points the lines intersect and the points they come from. If you calculated the velocity from starting point to the time it came to the ending point, they wouldn't have the same velocity. A point represents a certain location at a certain time. You would have said that it goes from this point to another that is the same real distance in two different amounts of times.
Which lines and which points? In which diagram?
Have you tried these calculations yourself?
Say in the first diagram, the top yellow flash then takes forever to get to the other end of the train, while the bottom red flash takes no time at all to get to the bottom line or the other end of the train. The yellow line is trying to catch up to the train and the red line is able to get there sooner because of the motion of the train. Then in the diagram both flashes are sent at the same time. Then take different amounts of time to reach the black lines or opposite ends of the train.
The red and yellow flashes have the same slope, and therefore the same speed, in both diagrams.
In the platform rest frame:
The yellow flash begins at t = 0, x = -10, and reaches the front of the train at t = 50, x = 40.
It travels 50 units distance in 50 units time. Its speed is 1.
The red flash begins at t = 0, x = 10, and reaches the back of the train at t = 12.5, x=-2.5.
It travels -12.5 units distance in 12.5 units time. Its speed is -1.
In the train rest frame:
The yellow flash begins at t'=0, x'=0, and reaches the front of the train at t' = 12.5, x' = 12.5.
It travels 12.5 units distance in 12.5 units time. Its speed is 1.
The red flash begins at t'=0, x'=0, and reaches the back of the train at t' = 12.5, x' = -12.5.
It travels -12.5 units distance in 12.5 units time. Its speed is -1.