Let the distance be d and the boat speed in still water be v. Write two equations in d and v from the information given in the problem statement.
Since the current speed is 3 mi/hr, If we let v be the boats speed in still water, v, then the speed upstream is v- 3 and the speed downstream is v+ 3. Since "distance= speed* time, d= (v- 3)5 upstream and d= (v+ 3)3. Although you don't know d, you know that d is the same in both equations and, according to Euclid, "quantities equal to the same thing are equal to each other" so you can form an equation without knowing d.