Let \(\theta\) be the angle subtended by the object and \(\theta'\) the angle subtended by the image. Then the magnification of telescope says that
\begin{equation*}
\left| \dfrac{\theta'}{\theta}\right| = |M| = \dfrac{f_o}{f_e}.
\end{equation*}
This gives
\begin{equation*}
|\theta| = \dfrac{f_e}{f_o}\times theta'.\ \ \ (1)
\end{equation*}
Suppose \(D\) be the distance between the stars and \(R\) the distance to the star, then
\begin{equation*}
\theta \approx \dfrac{D}{R}.\ \ \ (2)
\end{equation*}
From (1) and (2) we find
\begin{equation*}
R = \dfrac{D}{\theta} = \dfrac{f_o}{f_e\:\theta'}\times D.
\end{equation*}
Now, putting in the numerical values we get
\begin{equation*}
R = \dfrac{300\:\textrm{cm}}{ 1.5\:\textrm{cm}\times 10^{-5}\: \textrm{rad}}\times 10^9\: \textrm{km} = 2\times 10^{16}\: \textrm{km}
\end{equation*}