Example 4 Let the function $f(x)=\frac{x+m}{x+1}$, and there exists a function $s=\varphi(t)=a t+b\left(t>\frac{1}{2}, a \neq 0\right)$, satisfying
$$
f\left(\frac{2 t-1}{t}\right)=\frac{2 s+1}{s} .
$$
Prove: (1) There exists a function $t=g(s)=c s+d(s>0)$, satisfying $f\left(\frac{2 s+1}{s}\right)=\frac{2 t-1}{t}$;
(2) If $x_{1}=3, x_{n+1}=f\left(x_{n}\right)(n=1,2, \cdots)$, then $\left|x_{n}-2\right| \leqslant \frac{1}{3^{n+1}}$.
(2010, Joint Autonomous Admissions Examination of Tsinghua University and Other Universities)

Proof (1) Let $f\left(\frac{2 t-1}{t}\right)=\frac{2 s+1}{s}$.
Substitute $s=a t+b$ and simplify to get $a(m-4) t^{2}+[b(m-4)+a-3] t+(b+1)=0$.
Thus, $\left\{\begin{array}{l}b+1=0, \\ b(m-4)+a-3=0, \\ a(m-4)=0 .\end{array}\right.$
Solving, we get $b=-1, m=4, a=3$.
Therefore, $f(x)=\frac{x+4}{x+1}$.
Let $f\left(\frac{2 s+1}{s}\right)=\frac{2 t-1}{t}$.
Substitute $t=c s+d$ and simplify to get
$c s+d=3 s+1$.
Therefore, there exists a function $t=g(s)=c s+d(s>0)$, satisfying $f\left(\frac{2 s+1}{s}\right)=\frac{2 t-1}{t}$.
$$
\begin{array}{l}
\text { (2) Let } s_{1}=1, t=g\left(s_{1}\right)=3 s_{1}+1=4, \\
s_{n+1}=\varphi\left(t_{n}\right)=3 t_{n}-1, \\
t_{n+1}=g\left(s_{n+1}\right)=3 s_{n+1}+1(n=1,2, \cdots) .
\end{array}
$$
(2) Let $s_{1}=1, t=g\left(s_{1}\right)=3 s_{1}+1=4$,
$s_{n+1}=\varphi\left(t_{n}\right)=3 t_{n}-1$,
$t_{n+1}=g\left(s_{n+1}\right)=3 s_{n+1}+1(n=1,2, \cdots)$.
Notice that, $x_{1}=\frac{2 s_{1}+1}{s_{1}}$.
From (1), we know
$x_{2 n-1}=\frac{2 s_{n}+1}{s_{n}}$,
$x_{2 n}=\frac{2 t_{n}-1}{t_{n}}(n=1,2, \cdots)$.
Then $s_{n+1}=3 t_{n}-1=9 s_{n}+2$
$\Rightarrow s_{n+1}+\frac{1}{4}=9\left(s_{n}+\frac{1}{4}\right)$.
Hence, $s_{n}=\frac{1}{4}\left(5 \times 3^{2 n-2}-1\right)$,
$t_{n}=3 s_{n}+1=\frac{1}{4}\left(5 \times 3^{2 n-1}+1\right)$.
Thus, $x_{2 n-1}=2+\frac{1}{s_{n}}=2+\frac{4}{5 \times 3^{2 n-2}-1}$,
$x_{2 n}=2-\frac{1}{t_{n}}=2-\frac{4}{5 \times 3^{2 n-1}+1}$.
Therefore, $x_{n}=2+(-1)^{n+1} \frac{4}{5 \times 3^{n-1}+(-1)^{n}}(n=1,2, \cdots)$.
Then $\left|x_{n}-2\right|=\frac{4}{4 \times 3^{n-1}+\left[3^{n-1}+(-1)^{n}\right]}$ $\leqslant \frac{1}{3^{n-1}}$.