Solution: set the speed to x and return to x+8; The distance between the two ports is y kilometers (one side)
There is a quadratic equation with one variable.
Y/x (time to go) +y/(x+8) (time to return) = 2.
(y/x-1)*x=6/2=3 (according to the condition: the second hour is 6 kilometers more than 1 hour).
Y= 15 x= 12 of the solution.
Then the distance between the two ports is 15km.