So, speed of the current is 4 mph.
When you travel downstream, your speed relative to the riverbank is the boat's speed relative tot the water PLUS the speed of the current. Vdown = Vboat + V river
When you travel upstream, your speed relative to the riverbank is the boat's speed relative to the water MINUS the speed of the current. Vup = Vboat - Vriver
The time to go downstream 18 miles is the same time to upstream 10 miles: call this 't'.
So, since distance = rate of travel times the time,
18 miles = t * Vdown, and
10 miles = t * Vup.
Solve the first equation for t in terms of the other quantities.
Substitute for t in the second equation and solve for Vboat!