distance = speed × time
The distance traveled downwind is 14x. The speed upwind is 4 mph less than 14 mph, so is 10 mph. The distance traveled in x hours upwind is 10x. That distance is 6 miles short of the downwind distance, so we can write the equation ...
... 10x = 14x -6
... 0 = 4x -6 . . . . . subtract 10x
... 0 = x -1.5 . . . . . divide by 4
... 1.5 = x . . . . . . . the downwind travel time is 1.5 hours.
The remaining distance upwind is 6 miles, and it is covered at 10 mph, so will take ...
... (6 mi)/(10 mi/h) = 0.6 h
Then the total trip takes x hours downwind plus x hours upwind plus 6/10 hours to finish the upwind trip:
... 2x+0.6 = 2(1.5) +0.6 = 3.6 . . . hours