Let the speed of the stream be x km/hr.
speed of the boat in still water = 18 km/hr.
Total Distance = 24 km.
We know that,
Speed of the boat up stream = speed of the boat in still water − speed of the stream
= (18 − x) km/hr
Speed of the boat down stream = speed of the boat in still water + speed of the stream
= (18 + x) km/hr
Time of up stream journey = t1 = hr
Time of down stream journey = t2 = hr
According to the question,
t1 − t2 = 1 hr
Since, speed cannot be negative.
Thus, speed of the stream is 6 km/hr.