5. (1) In the sequence $\left\{a_{n}\right\}$,
$$
a_{1}=1, a_{n+1}=\frac{10+4 a_{n}}{1+a_{n}}\left(n \in \mathbf{Z}_{+}\right) \text {, }
$$

Find the general term formula for the sequence $\left\{a_{n}\right\}$;
(2) Given the sequence $\left\{a_{n}\right\}$ satisfies:
$$
a_{1}=2, a_{n+1}=\frac{a_{n}-1}{a_{n}+1}\left(n \in \mathbf{Z}_{+}\right) \text {. }
$$

Find the value of $a_{2019}$.
(1) Consider $f(x)=\frac{4 x+10}{x+1}$.
Let $f(x)=x \Rightarrow x=5$ or -2
$\Rightarrow$ The fixed points of the function $f(x)$ are 5 or -2.
By conclusion 4, we know
$$
a_{n}=5-\frac{7}{1+\frac{3}{4}(-6)^{n-1}}\left(n \in \mathbf{Z}_{+}\right) \text {. }
$$
(2) Let $f(x)=\frac{x-1}{x+1}$.

Let $f(x)=x$, rearranging gives $x^{2}+1=0$ which has no real roots.
By conclusion 4, we know $\left\{a_{n}\right\}$ is a periodic sequence.
Given $a_{1}=2$, we calculate
$$
\begin{array}{l}
a_{2}=\frac{1}{3}, a_{3}=-\frac{1}{2}, a_{4}=-3, \\
a_{5}=2, a_{6}=\frac{1}{3}, a_{7}=-\frac{1}{2}, \\
\ldots \ldots .
\end{array}
$$

We can see that $\left\{a_{n}\right\}$ is a periodic sequence with a period of 4.
Thus, $a_{2019}=a_{3}=-\frac{1}{2}$.