Let the speed of the stream be x km/h.
Therefore, the speed of the boat upstream = (18 - x)km/h and the speed of the boat downstream = (18 + x)km/h.
i.e 24(18 + x) - 24(18 - x) = (18 - x)(18 + x)
i.e x2 + 48x - 324 = 0
Using the quadratic formula, we get
Since x is the speed of the stream, it cannot be negative. So,we ignore the root x= -54.
Therefore, x= gives the speed of the stream as km/h.