Let, the boating speed in still water be x km / hr
We know for upstream the resultant speed is given by ( boat speed - speed of the stream )
Similarly for downstream we have ( boat speed + speed of the stream )
Moreover we know , Distance = speed X time
Now, he takes 5 hours in downstream
∴D=5×(x+40) [ speed of the stream is 40 km/hr (given) ]
∴D=5x+200
And for upstream he takes 10 hours.
∴D=10×(x−40)∴D=10x−400
Since the distance is the same, we have,
5 x + 200 = 10 x - 400
or, 5 x = 600
⇒ x = 120
∴ The boating speed is 120 km / hr .