One formula, three forms
speed = distance / time, so distance = speed * time and time = distance / speed.
The whole topic is that formula plus careful unit handling.
The conversion you must know cold.
- km/h to m/s: multiply by 5/18
- m/s to km/h: multiply by 18/5
So 72 km/h = 72 * 5/18 = 20 m/s. 36 km/h = 10 m/s. Anything divisible by 18 converts in one step.
Mixing units is the single biggest source of wrong answers here. Train lengths come in metres and speeds come in km/h. Convert the speed to m/s first, before you do anything else, and write the unit next to every number.