Answer:
d = 6 km
Step-by-step explanation:
In this case we have the relative speed of the boot changes, suppose that the boat and the river have the same direction when the boat goes from A to point B
vbr = vrt + vbt
vbr = 2 + 4
vbr = 6 km / h
v₁ = 6 km / h
velocity is constant
v₁ = d / t₁
t₁ = d / v₁
when the boat returns to the starting point the speed is both opposite
vbr = vbt - vrt
vbr = 4-2
vbr = 2 km / h
v₂ = 2 km / h
as the speed is constant
t₂ = d / v₂
they also indicate that the total time is 4 h
t₁ + t₂ = 4
we substitute
4 = d / v₁ + d / v₂
4 = d (1 / v₁ + 1 / v₂)
d = 4 / (1 / v₁ + 1 / v₂)
let's calculate
d = 4 / (1/6 + 1/2)
d = 4 / 0.6666 67
d = 6 km