Since it is a right triangle, apply the Pythagorean theorem:
c^2 = a^2 +b ^2
Where:
c= hypotenuse = 3
a & b = the other 2 legs of the triangle = (2 and x )
x= distance between the two docks
Replacing:
3^2 = 2^2 + x ^2
Solve for x:
9 = 4 + x^2
9-4 = x^2
5 = x^2
√5 = x
x= 2.2 mi