Let AB be the lighthouse and the two ships be at point C and D respectively.
In ∆ABC,
\(\frac{AB}{ BC} = tan 45^{\degree}\)
\(\frac{75}{ BC} = 1\)
\(BC = 75\,m\)
In ∆ABD,
\(\frac{AB}{ BD}= tan 60^{\degree}\)
\(\frac{75}{ BC +CD} = \frac{1}{\sqrt3}\)
\(\frac{75}{ 75 + CD} = \frac1{ \sqrt3}\)
\(75 \sqrt3 = 75 + CD\)
\(75 (\sqrt3 -1)m = CD\)
Therefore, the distance between the two ships is \(75(\sqrt3 -1) \,m\).