Hi XIPP,

Here's how we reached this equation: (5/x+y) + (5/x–y) = 5/y

Let the speed of soldier and troop be x,y m/s resp.

thus, speed of soldier wrt troop(Relative speed of soldier when he is traversing from start of file to end)=x-y m/s (direction of both soldier and troop are same)

speed of soldier wrt troop(Relative speed of soldier when he is traversing from end of file to start)=x- (-y)=x+y m/s

(direction of both soldier and troop are opposite)

Now total total time in which soldier returned to his original position = time in which troop moved 5 m.

during both journeys of soldier he traversed 5 m. wrt troop, thus, we considered his relative speed wrt troop.

(since time=t1+t2; t1=5/(x-y); t2=5/(x+y); time of troop= 5/y)

And we finally have

5/(x-y)+ 5/(x+y)=5/y.

"Woh mara papad wale ko!"