Let the speed of the boat in still water = x miles/hr.

Speed of the boat downstream will be greater than its speed in still water, due to favorable current of water.

\ Speed of the boat downstream = Speed of the boat + Speed of water current.

= (x+4) miles/hr.

Speed of the boat upstream will be less than its speed in still water, due to opposing current of water.

\Speed of the boat upstream = Speed of the boat - Speed of the current.

= (x-40)miles/hr.

Let the time taken to cover the distance downstream = t hrs.

\Time taken to cover distance upstream = 5t hr.

Now, distance traveled downstream = Speed * Time

= (x+4)t miles.

Distance traveled upstream = (x-4)5t miles.

Since distance traveled both ways are same.

(x+4)t = (x-4)5t

Dividing both sides by 't'(¹0).

(x+4) = 5(x-4)

x+4 = 5x-20

Transposing 5x and 4

5x - x = 20 + 4

4x = 24

x = 24/4 = 6

Speed of the boat downstream will be greater than its speed in still water, due to favorable current of water.

\ Speed of the boat downstream = Speed of the boat + Speed of water current.

= (x+4) miles/hr.

Speed of the boat upstream will be less than its speed in still water, due to opposing current of water.

\Speed of the boat upstream = Speed of the boat - Speed of the current.

= (x-40)miles/hr.

Let the time taken to cover the distance downstream = t hrs.

\Time taken to cover distance upstream = 5t hr.

Now, distance traveled downstream = Speed * Time

= (x+4)t miles.

Distance traveled upstream = (x-4)5t miles.

Since distance traveled both ways are same.

(x+4)t = (x-4)5t

Dividing both sides by 't'(¹0).

(x+4) = 5(x-4)

x+4 = 5x-20

Transposing 5x and 4

5x - x = 20 + 4

4x = 24

x = 24/4 = 6