Let the speed of the stream be x km/hr
Speed of the boat upstream = Speed of boat in still water - Speed of the stream
∴ Speed of the boat upstream = (18-x) km/hr
Speed of the boat downstream = Speed of the boat still water + Speed of the stream
∴ Speed of the boat upstream = (18+x) km/hr
Time of upstream journey = Time for downstream journey + 1 hr
∴Distance covered upstreamSpeed of the boat upstream=Distance covered downstreamSpeed of the boat downstream+1hr
⇒24km(18−x)=1
⇒2418−x−2418+x=1
⇒432+24x+432+24x(18−x)(18+x)=1
⇒48x=324−x2
⇒x2+48x−324=0
⇒x(x+54)−6(x+54)=0
⇒(x+54)(x−6)=0
⇒x+54=0orx−6=0
⇒x=−54orx=6
∴ x=6 (Speed of the stream cannot be negative)
Thus, the speed of stream is 6 km/hr.