We will assume that the Earth is flat, and that we are not too far North. Draw a picture. Let the share station be at $C$. For the first ship, go $42^\circ40'$ East from due North, and travel $155$ km. Call the resulting point $A$. So we face North from $C$, turn $42^\circ40'$ clockwise, and sail $155$ km.
For the second, go $45^\circ10'$ West from due North, and travel $165$ km. Call the resulting point $B$.
Then $\triangle ABC$ has $CA=155$, $CB=165$, and $\angle C=42^\circ40'+45^\circ10'=87^\circ 50'$.
By the Cosine Law, $(AB)^2=155^2+165^2-2(155)(165)\cos C.$ Calculate. It turns out that the distance is about $222$ km.
Remark: We can proceed more informally without the Cosine Law, and with a little crossing of the fingers. Note that $\angle C$ is almost a right angle. If we pretend it is a right angle, we can use the Pythagorean Theorem to estimate the distance. That gives $226$ km. Not very different from $222$.