When two trains move towards each other, their relative speed is the sum of their speeds.
Convert speeds to m/s
45 km/h=360045×1000=12.5 m/s
51 km/h=360051×1000=14.1667 m/s
Relative speed
12.5+14.1667=26.6667 m/s
=380 m/s
Total distance covered while crossing
Distance=Speed×Time
=380×21
=80×7=560 m
So, sum of lengths of both trains = 560 m
Find unknown length
Given one train = 290 m
Other train=560−290=270 m
Final Answer: 270 m