The question isn't very difficult. Visualisation is key here.
Take a moment to the understand the figure below.
Attachment:
Screenshot 2019-02-22 at 05.37.45.png [ 24.41 KiB | Viewed 883 times ]
Now we know p is stranded at 25% of the near end.
Let the distance of the entire tunnel be x.
We may divide the tunnel into two parts; x/4 and 3x/4
Also, the distance between the train and tunnel is unknown. Lets call it d.
Let the speed of the person be s
Let the speed of the train be a.
Question is: Find the ratio a/s Case IThe person runs towards the near end with twice the speed
ie. 2sThe train is also approaching the near end.
Both reach at exact same time.
Hence time is common and can be equated.
Time taken by train = d/a
Time taken by person = (x/4)/2s= x/8s
d/a = x/8s
a/s=8d/x -----> Eqn (1)
Case IIThe person runs towards the farther end
He needs to cover the distance 3x/4
He also runs at 75% speed ie. 3s/4
Time taken by person = (3x/4)/(3s/4) =
x/s {time=distance/speed}
The train is also approaching the farther end.
The train needs to cover the distance d and then the distance x ie. d + x
The speed of the train is again a.
Time taken by train = (d+x)/a
We can again equate the two time periods since they are equal.
(d+x)/a=x/s
a/s=(d+x)/xa/s = d/x + 1 -----> Eqn (2)
-----------------------------------------------------Substituting 1 in 2 we get
8d/x=d/x +1
7d/x=1
x=7dUsing the value of x found in eqn (1)
a/s=8d/7d
a/s=8/7