Two trains, each two miles long, enter two one mile long tunnels that are two miles apart from one another on the same track. The trains enter the tunnels at exactly the same time. The first train is going 5 miles/hour, and the second train is going 10 miles/hour. What is the sum of the lengths of the two trains that will protrude from the tunnels at the exact moment that they collide, assuming that neither train changes its speed prior to collision? The trains are on the same track headed in opposite directions

length of each train 2 miles

length of each tunnel = 1

two tunnels = 2miles.

distance betweeen two tunnels = 2miles

Total distance = 4 miles.

...

first train 5 mph

second 10 mph.

they are moving towards each other. so effective speed = 15 mph.

time taken to collide = 4/15 hours.

..

speed of first train = 5mph

distance travelled by first train = 5*4/15 = 4/3 miles.

length of train = 2 miles.

so length out of the tunnel = 2-4/3= 2/3 miles.

..

speed of second train = 10 mph.

distance travelled by second train = 10*4/15 = 8/3 miles

so length out of the tunnel = 2-8/3===> -2/3

it means that the second train is 2/3 mile inside the tunnel

sum of the lengths outside the tunnel = 2/3 miles