Let the speed of the stream be x km/hr. Then,
Speed of boat downstream = (15 + x) km/hr
and speed of boat upstream = (15 – x) km/hr
∴ \(\frac{30}{15+x}+\frac{30}{15-x}=4\frac12=\frac92\)
⇒ \(\frac{30(15-x)+30(15+x)}{(15+x)(15-x)}=\frac92\) ⇒ \(\frac{900}{225-x^2}=\frac92\) ⇒ 200 = 225 - x2
⇒ x2 = 25 ⇒ x = 5 km/hr.