Answer:
Let speed of boat in still water=B km/hr
And given speed of water=5 km/hr
Speed of boat upstream=B-5 km/hr
Speed of boat downstream= B+5 km/hr
So
Using the formula time=distance/speed
Time taken to travel 30 km upstream t1= 30/(B-5)
Time taken to travel 50 km downstream= 50/(B+5)
Given t1=t2
30/(B-5)=50/(B+5)
=> 3/(B-5)=5/(B+5)
=> 3(B+5) = 5(B-5)
=> 3B+15 = 5B+25
=> 40=2B
=> B=20 km/hr