When you solve (in radians):
$$\tan\left(\theta\right)=\frac{7}{9}\Longleftrightarrow\theta=n\pi+\arctan\left(\frac{7}{9}\right)$$
Where $n\in\mathbb{Z}$
When we substiute that into $\cos\left(\theta\right)$:
$$\cos\left(n\pi+\arctan\left(\frac{7}{9}\right)\right)=\begin{cases}
\frac{9}{\sqrt{130}}\space\space\space\space\space\space\space\space\space\space\space\space\space\text{when}\space n\space\text{is}\space\text{even}\\
-\frac{9}{\sqrt{130}}\space\space\space\space\space\space\space\space\space\space\text{when}\space n\space\text{is}\space\text{odd}
\end{cases}$$
When we substiute that into $\sin\left(\theta\right)$:
$$\sin\left(n\pi+\arctan\left(\frac{7}{9}\right)\right)=\begin{cases}
\frac{7}{\sqrt{130}}\space\space\space\space\space\space\space\space\space\space\space\space\space\text{when}\space n\space\text{is}\space\text{even}\\
-\frac{7}{\sqrt{130}}\space\space\space\space\space\space\space\space\space\space\text{when}\space n\space\text{is}\space\text{odd}
\end{cases}$$
So, when $x\in\mathbb{R}$:
$$\tan\left(\frac{\theta}{2}\right)=\frac{\sin\left(\theta\right)}{1+\cos\left(\theta\right)}=\frac{\sin\left(n\pi+\arctan\left(\frac{7}{9}\right)\right)}{1+\cos\left(n\pi+\arctan\left(\frac{7}{9}\right)\right)}=\begin{cases}
\frac{\sqrt{130}-9}{7}\space\space\space\space\space\space\space\space\space\space\space\space\space\text{when}\space n\space\text{is}\space\text{even}\\
-\frac{9+\sqrt{130}}{7}\space\space\space\space\space\space\space\space\space\space\text{when}\space n\space\text{is}\space\text{odd}
\end{cases}$$