Call the rate of the boat in still water, R
And when the boat is traveling with the current, its rate is (R + 6) km/ hr
So... Rate * Time = Total Distance
( R + 6 ) * 4 = D (1)
And Distance / Rate = Time (in hours)
Note that when the boat goes against the current, that its rate is being slowed by the current...so its rate is (R - 6)...so we have
D / ( R - 6) = 10 (2)
Sub (1) into (2)
(R + 6) * 4 / (R - 6) = 10 simplify
(R + 6) * 4 = 10 (R - 6)
4R + 24 = 10 R - 60 subtract 4R from both sides, add 60 to both sides
84 = 6R divide both sides by 6
14 = R ( the rate in still water is 14 km/hr)
To find the distance, plug 14 into (1)
(14 + 6) * 4 = D
20 * 4 = 80
So...the distance is 80 km (one way)