You aren't sharing much information (no directions??).
If your triangle is a right triangle AND 5x-1 and 4x+1 represent the lengths of the 2 shortest sides, then the Pyth. Theorem tells us that
(5x-1)^2 + (4x+1)^2 = (hypotenuse length)^2.
We know that this could not be an equilateral triangle, because 5x-1 differs from 4x+1.
This could be an isosceles triangle if the third side were either 5x-1 or 4x+1.
Please be more specific about what you're supposed to do here.
18a: 3*3*3*2*a
20a: 2*2*5*a
6a: 3*2*a
the greatest common factor is 2a
We know that
The arrangement forms an isosceles triangle with equal legs of 8 miles.
The angle between the legs is equal to

°
Therefore, the other two angles are
Angles = (180-60)/2 = 120/2 = 60°
It can, therefore, be noted that all angles are equal and thus the resulting triangle is actually an equilateral triangle and thus all the sides are equal.
Hence
the answer is
the distance between the two ships is 8 miles apart
alternative Method
Applying the law of cosines
<span>c²=a²+b²-2*a*b*cos C
</span>where
a=8 miles
b=8 miles
C is the angle between the legs-------> 123-63------> 60 degrees
c is the distance between the two ships
so
c²=8²+8²-2*8*8*cos 60------> c²=64-------> c=√64------> c=8 miles