Let speed of stream be x km/h.
Given:
Speed of boat = 18 km/h
Distance covered upstream = 36 km
Distance covered downstream = 36 km
It takes more to go 36 km upstream than to return downstream to the same spot
Now, Speed of boat upstream = 18 − x km/h
Speed of boat downstream = 18 + x km/h
According to the question,
Time to go upstream = hours + Time to go downstream
Time to go upstream − Time to go downstream =
Hence, the speed of the stream is 6 km/h.