Let the speed of the stream be x km/hr.
Then, speed downstream = (5 + x) km/hr.
And, speed upstream = (5 – x) km/hr.
Now, Time taken by the boat to cover 12 km upstream =
And, Time taken by the boat to cover 12 km downstream =
According to given condition:
Hence, speed of stream = 1 km/hr.