Hint :
Suppose two light pulses $p'_1$ and $p'_2$ are emitted successively from the Star towards the Earth at time moments $t'_1$ and $t'_2$, apart by an infinitesimal time interval $\mathrm{d}t'=t'_2\!-\!t'_1$. Time $t'$ is the time in the rest frame $\mathrm{S'}$ of the Star.
These two events happen in the rest frame $\mathrm{S}$ of the Earth at time moments $t_1$ and $t_2$, apart by the dilated infinitesimal time interval $\mathrm{d}t=t_2\!-\!t_1=\gamma\left(v\right)\mathrm{d}t'$. Time $t$ is the time in the rest frame $\mathrm{S}$ of the Earth.
Now, let the two light pulses arrive to Earth at Earth time moments $\hat{t}_{\!1}$ and $\hat{t}_{\!2}$, apart by an infinitesimal time interval $\mathrm{d}\hat{t}=\hat{t}_{\!2}\!-\!\hat{t}_{\!1}$. If the Star would be at rest relatively to Earth or its motion would be transverse (no radial motion : $v_\mathrm{r}=0$) then $\mathrm{d}\hat{t}=\mathrm{d}t$. But because of the radial motion of the Star relatively to Earth the 2nd pulse, which emitted later, has to run a larger distance than the 1rst pulse if the Star is moving away or has to run a smaller distance than the 1rst pulse if the Star is approaching. In the first case $\mathrm{d}\hat{t}>\mathrm{d}t$. In the second case, that shown in the Figure, $\mathrm{d}\hat{t}<\mathrm{d}t$.
So, if you could estimate the time interval $\mathrm{d}\hat{t}$ then you would solve the problem since the time intervals are inversely proportional to frequencies that is proportional to wavelengths :
\begin{equation}
\dfrac{\mathrm{d}\hat{t}}{\mathrm{d}t'}=\dfrac{\nu'}{\nu}=\dfrac{\lambda}{\lambda'}=\dfrac{\lambda \text{(observed)}}{\lambda'\text{(emitted)}}
\end{equation}
$===================================================$
Solution 1 (related to the Hint)
As shown in Figure-02 above
\begin{equation}
\mathrm{d}t=t_2\!-\!t_1=\gamma(v)\left(t'_{\!2}\!-\!t'_{\!1}\right) =\gamma(v)\mathrm{d}t'
\tag{1.01}
\end{equation}
\begin{equation}
\mathrm{dr}\approx \mathrm{r_2}-\mathrm{r_1}=-v_\mathrm{r}\,\mathrm{d}t=-v \cos\theta\, \gamma(v)\,\mathrm{d}t'
\tag{1.02}
\end{equation}
\begin{equation}
\mathrm{d}\hat{t}=\hat{t}_2\!-\!\hat{t}_1=\left(t_2\!+\!\dfrac{ \mathrm{r}_2}{c}\right)\!-\!\left( t_1\!+\!\dfrac{ \mathrm{r}_1}{c} \right)=\mathrm{d}t\!+\!\dfrac{\mathrm{dr}}{c} =\gamma(v)\mathrm{d}t'\!-\!\dfrac{v \cos\theta\, \gamma(v)\,\mathrm{d}t' }{c} \Longrightarrow
\nonumber
\end{equation}
\begin{equation}
\dfrac{\mathrm{d}\hat{t}}{\mathrm{d}t' } = \dfrac{1\!-\!\dfrac{v \cos\theta}{c}}{ \sqrt{1\!-\!\dfrac{v^2}{c^2}}} \stackrel{\left(\beta=\tfrac{v}{c}\right)}{=\!=\!=}\dfrac{1\!-\!\beta \cos\theta}{\sqrt{1\!-\!\beta^2}}=\dfrac{\nu' \text{(emitted)}}{\nu\:\text{(observed)}} =\dfrac{\lambda\:\text{(observed)}}{\lambda' \text{(emitted)}}
\tag{1.03}
\end{equation}
QED.
$===================================================$
Solution 2
Link : My answer in About de Broglie relations
For a plane wave the angular frequency 4-vector
\begin{equation}
\boldsymbol{\Omega} \equiv \left(\omega,c\mathbf{k} \right)
\tag{2.01}
\end{equation}
is transformed between frames under the Lorentz transformation. This is proved in the link for a more general configuration of two frames (see the Figure in the end of the link). In (2.01)
\begin{equation}
\omega= 2\pi\nu
\tag{2.02}
\end{equation}
is the angular frequency and $\:\nu\:$ the frequency. Also
\begin{equation}
\mathbf{k}= \dfrac{ 2\pi}{\lambda} \;\mathbf{m} , \qquad \Vert \mathbf{m}\Vert =1
\tag{2.03}
\end{equation}
is the wave 3-vector and $\:\lambda\:$ the wavelength. The plane wave $^\prime$$^\prime$propagates$^\prime$$^\prime$ with velocity vector
\begin{equation}
\mathbf{w}= \dfrac{ \omega}{\Vert \mathbf{k}\Vert } \;\mathbf{m}=\lambda\nu\;\mathbf{m} = \dfrac{ \omega}{\Vert \mathbf{k}\Vert^{2}}\mathbf{k}, \qquad \Vert \mathbf{w}\Vert \equiv \mathrm{w} = \dfrac{ \omega}{\Vert \mathbf{k}\Vert }=\lambda\nu
\tag{2.04}
\end{equation}
From the Lorentz equation (A-14b) in the link we have
\begin{equation}
\omega^{\boldsymbol{\prime}} =\gamma\left(\omega\!+\!\dfrac{ \mathbf{v}\boldsymbol{\cdot}c\mathbf{k}}{c}\right)
\tag{2.05}
\end{equation}
For a light wave $\: \mathbf{k}=(2\pi\nu/c)\mathbf{m}\:$ so
\begin{equation}
\nu^{\boldsymbol{\prime}} =\gamma\left(1\!+\!\dfrac{ \mathbf{v}\boldsymbol{\cdot}\mathbf{m}}{c}\right)\nu
\tag{2.06}
\end{equation}
In above equation $\:\mathbf{v}=\!-\boldsymbol{v}\:$ is the velocity vector of the Earth relatively to the Star , the vector $\:\boldsymbol{v}\:$ shown in Figures-01,-02 and $\:\mathbf{m}\:$ the unit vector parallel to its radial component $\:\boldsymbol{v}_{\mathrm{r}}\:$
\begin{equation}
\mathbf{m}=\dfrac{\boldsymbol{v}_{\mathrm{r}}}{\Vert\boldsymbol{v}_{\mathrm{r}}\Vert}
\tag{2.07}
\end{equation}
so that finally
\begin{equation}
\dfrac{\nu' \text{(emitted)}}{\nu\:\text{(observed)}}=\gamma\left(1\!-\!\dfrac{ v \cos \theta}{c}\right)= \dfrac{1\!-\!\dfrac{v \cos\theta}{c}}{ \sqrt{1\!-\!\dfrac{v^2}{c^2}}}
\tag{2.08}
\end{equation}