The answer is probably going to be some number of seconds, so let’s begin by converting 45 k/hr to meters per second.
Here’s a hint: 45 km/hr is the same as 45,000 meters/3600 seconds.
Do you agree? If so, do the arithmetic to find the train’s speed in meters/sec.
Then figure out how many seconds it would take for 400 meters of train to go past a point.
You’re on your own with the direct and inverse proportion buts.