22. (14 points) Given the sequence $\left\{x_{n}\right\}$,
$$
x_{1}=a, x_{n+1}=\frac{2 x_{n}}{1+x_{n}^{2}} \text {. }
$$
(1) Let $a=\tan \theta\left(0<\theta<\frac{\pi}{2}\right)$, if $x_{3}<\frac{4}{5}$, find the range of $\theta$;
(2) Define the function $f(x)$ on $(-1,1)$, for any $x, y \in(-1,1)$, there is
$$
f(x)-f(y)=f\left(\frac{x-y}{1-x y}\right),
$$

if $f(a)=\frac{1}{2}$, try to find the general term formula of the sequence $\left\{f\left(x_{n}\right)\right\}$.