A person, rowing at the rate of 5 km/h in still water , takes thrice as much time in going 40 km upstream as in going 40km downstream. find the speed of the stream .