You can approach such curve as a composition of two quadratic functions. The first represents the accelerating path and the other the decelerating path.
$$\text{y}_{1} = {a}_{1} \cdot x^2$$
$$\text{y}_{2} = {a}_{2} \cdot x^2 + {b}_{2} \cdot x + {c}_{2} $$
Subject to:
$$\text{y'}_{1} = 0 @ 8:00$$
$$\text{y}_{1} = \text{y}_{2} @ 8:13 aprox$$
$$\text{y'}_{1} = \text{y'}_{2} @ 8:13 aprox$$
$$\text{y'}_{2} = 0 @ 8:27:30$$
${a}_{1}$ must be positive and ${a}_{2}$ must be negative.
Then derivate two times.
Remember to use real numbers for time.
8:08 = 8+8/60 = 8.0133...
Your question:
Why I can't take the total distance travelled by the train from 0800-0808 the divide it by 8 mins ?
Doing this, you are averaging speed.