we know that
The time it takes for the train to pass a single post is equal to the time it takes for the train to pass its length.
the length of the train is-----> 375 m
convert to Km
1 Km =1,000 m
375 m=375/1,000=0.375 Km
the speed of the train is 45 km/hour
so
by proportion

convert to minutes
1 hour=60 minutes
0.0083 hours=0.0083*60=0.5 minutes
convert to seconds
1 minute=60 sec
0.5 minutes=0.5*60=30 sec
therefore
the answer is
30 seconds