Answer
See below.
Work Step by Step
The third angle: $180-40-45=95^\circ$.
Let the two distances be $d_1,d_2$.
Using the law of sines, $\frac{d_1}{\sin45^\circ}=\frac{300}{\sin95^\circ}\\d_1=\frac{300\sin45^\circ}{\sin95^\circ}\approx212.9$
$\frac{d_2}{\sin40^\circ}=\frac{300}{\sin95^\circ}\\d_2=\frac{300\sin40^\circ}{\sin95^\circ}\approx193.6$