.
The effective speed upstream is = 5 km/h.
It is the difference of the boat speed in still water "u" and the rate of stream "v":
u - v = 5. (1)
The effective speed downstream is = 15 km/h.
It is the sum of the boat speed in still water "u" and the rate of stream "v":
u + v = 15. (2)
Add the equations (1) and (2). You will get
2u = 5 + 15 = 20, ---> u = = 10 km/h.
Thus the speed of the boat in still water is 10 km/h.
Then the speed of the stream is v = 15 - 5 = 15 - 10 = 5 km/h, from equation (2).
Answer. The speed of the boat in still water is 10 km/h. The speed of the stream is 5 km/h.