Given:
Half of the voyage is traveled in 18 knots.
The remaining half of the voyage is traveled in 22 knots.
The second half of the trip was completed in 2 hours less than the first half of the trip.
So, the equation is,
[tex]\begin{gathered} \frac{D}{18}-\frac{D}{22}=2 \\ \frac{22D-18D}{(18)(22)}=2 \\ \frac{4D}{(18)(22)}=2 \\ D=9\times11\times2 \\ D=198\text{ nautical miles} \end{gathered}[/tex]So, the distance traveled at 18 knots is 198 nautical miles.
And hence, the total distance of the trip is 396 nautical miles.