Answer
$39.1\;\rm mi$
Work Step by Step
a)
We know that the two ships start at the same point.
So, their velocity vectors are $\vec v_{AP}$ and $\vec v_{BP}$ whereas $_P$ refers to the port at which they start to move.
Now we need to find their directions relative to the east ($+x$-direction).
$$\theta_A=30^\circ +90^\circ=\bf 120^\circ $$
$$\theta_B=90^\circ -20^\circ =\bf 70^\circ $$
Hence, their velocity vectors in components form are given by
$$\vec v_{AP}=(20\cos 120^\circ) \hat i+(20\sin 120^\circ)\hat j\tag 1$$
$$\vec v_{BP}=(25\cos 70^\circ ) \hat i+(25\sin 70^\circ )\hat j\tag 2$$
We know that the position vector of each ship is given by $\vec r=\vec v\Delta t$,
So, using (1)
$$\vec r_{AP}=\vec v_{AP} \Delta t=2\left[(20\cos 120^\circ) \hat i+(20\sin 120^\circ)\hat j\right]$$
$$\vec r_{AP}= (40\cos 120^\circ) \hat i+(40\sin 120^\circ)\hat j\tag 3 $$
and using (2)
$$\vec r_{BP}=\vec v_{BP} \Delta t=2\left[(25\cos 70^\circ ) \hat i+(25\sin 70^\circ )\hat j\right]$$
$$\vec r_{BP}= (50\cos 70^\circ ) \hat i+(50\sin 70^\circ )\hat j \tag 4$$
We know that the vector between the two ships is given by
$$\vec r_{AB}=\vec r_{AP}+\vec r_{PB}\\
\vec r_{AB}=\vec r_{AP}-\vec r_{BP}$$
Plugging from (3) and (4);
$$ \vec r_{AB}= (40\cos 120^\circ) \hat i+(40\sin 120^\circ)\hat j-\left[ (50\cos 70^\circ ) \hat i+(50\sin 70^\circ )\hat j\right]$$
$$ \vec r_{AB}= (40\cos 120^\circ) \hat i+(40\sin 120^\circ)\hat j- (50\cos 70^\circ ) \hat i-(50\sin 70^\circ )\hat j $$
$$ \vec r_{AB}= (40\cos 120^\circ) \hat i- (50\cos 70^\circ ) \hat i +(40\sin 120^\circ)\hat j-(50\sin 70^\circ )\hat j $$
$$ \boxed{\vec r_{AB}= -37.1\;\hat i-12.34\;\hat j }$$
Thus, the distance is given by applying the Pythagorean theorem;
$$ |\vec r_{AB}|= \sqrt{(-37.1)^2 +(-12.34)^2 }=\color{red}{\bf 39.1}\;\rm mi$$