Let's call v=15 km/h the speed of the boat in still water, and c the speed of the current.
When the boat travels with the current, its total speed is (v+c), and it travels for a distance of 35 km in a time t. When the boat travels against the current, its total speed is (v-c), and it travels for a distance of 25 km in the same time t. We can write the basic relationship of the uniform linear motion

for both situations:


If we divide the first equation by the second one, we find

and by rearranging this, we can find the value of c, the speed of the current:
