Example 14 Let $n>3$ be a given positive integer, and real numbers $x_{1}, x_{2}, \cdots, x_{n+1}, x_{n+2}$ satisfy $0<$ $x_{1}<x_{2}<\cdots<x_{n+1}<x_{n+2}$. Find
$$\frac{\left(\sum_{i=1}^{n} \frac{x_{i+1}}{x_{i}}\right)\left(\sum_{j=1}^{n} \frac{x_{j+2}}{x_{j+1}}\right)}{\sum_{k=1}^{n} \frac{x_{k+1} x_{k+2}}{x_{k+1}^{2}+x_{k} x_{k+2}} \sum_{i=1}^{n} \frac{x_{i+1}^{2}+x_{i} x_{i+2}}{x_{i} x_{i+1}}}$$

the minimum value, and discuss the conditions under which equality holds.
Let $t_{i}=\frac{x_{i+1}}{x_{i}}(1 \leqslant i \leqslant n+1)$, then the original expression equals
$$\frac{\sum_{i=1}^{n} t_{i} \sum_{i=1}^{n} t_{i+1}}{\sum_{i=1}^{n} \frac{t_{i} t_{i+1}}{t_{i}+t_{i+1}} \sum_{i=1}^{n}\left(t_{i}+t_{i+1}\right)}$$

By the Cauchy-Schwarz inequality, we have
$$\begin{aligned}
& \sum_{i=1}^{n} \frac{t_{i} t_{i+1}}{t_{i}+t_{i+1}} \sum_{i=1}^{n}\left(t_{i}+t_{i+1}\right) \\
= & \left(\sum_{i=1}^{n} t_{i}-\sum_{i=1}^{n} \frac{t_{i}^{2}}{t_{i}+t_{i+1}}\right) \sum_{i=1}^{n}\left(t_{i}+t_{i+1}\right) \\
= & \left(\sum_{i=1}^{n} t_{i}\right) \sum_{i=1}^{n}\left(t_{i}+t_{i+1}\right)-\left(\sum_{i=1}^{n} \frac{t_{i}^{2}}{t_{i}+t_{i+1}}\right) \sum_{i=1}^{n}\left(t_{i}+t_{i+1}\right) \\
\leqslant & \sum_{i=1}^{n} t_{i} \sum_{i=1}^{n}\left(t_{i}+t_{i+1}\right)-\left(\sum_{i=1}^{n} \frac{t_{i}}{\sqrt{t_{i}+t_{i+1}}} \cdot \sqrt{t_{i}+t_{i+1}}\right)^{2} \\
= & \left(\sum_{i=1}^{n} t_{i}\right)^{2}+\left(\sum_{i=1}^{n} t_{i}\right) \sum_{i=1}^{n} t_{i+1}-\left(\sum_{i=1}^{n} t_{i}\right)^{2}=\sum_{i=1}^{n} t_{i} \sum_{i=1}^{n} t_{i+1}
\end{aligned}$$

Therefore, the minimum value is greater than or equal to 1.
By the condition for equality in the Cauchy-Schwarz inequality, we get
$$\begin{array}{l}
\frac{\sqrt{t_{i}+t_{i+1}}}{\frac{t_{i}}{\sqrt{t_{i}+t_{i+1}}}}=d(1 \leqslant i \leqslant n) \\
\frac{t_{i+1}}{t_{i}}=d-1=c, 1 \leqslant i \leqslant n
\end{array}$$
that is,

Let $t_{1}=b, t_{j}=b c^{j-1}, 1 \leqslant j \leqslant n+1$, then we have
$$\frac{x_{j+1}}{x_{j}}=t_{j}=b c^{j-1}, 1 \leqslant j \leqslant n+1$$

Let $x_{1}=a>0$, then
$$x_{k}=t_{k-1} t_{k-2} \cdots t_{1} a=a b^{k-1} c^{\frac{(k-1)(k-2)}{2}}, 2 \leqslant k \leqslant n+2$$

Since $x_{2}>x_{1}$, we have $b=\frac{x_{2}}{x_{1}}>1$.
Also, since $t_{j}=b c^{j-1}>1,1 \leqslant j \leqslant n+1$, we have
$$c>\sqrt[n]{\frac{1}{b}}\left(\geqslant \sqrt[n-1]{\frac{1}{b}}, 1 \leqslant j \leqslant n+1\right)$$

Therefore, the minimum value is 1, and it is achieved if and only if $x_{1}=a, x_{k}=a b^{k-1} c^{\frac{(k-1)(k-2)}{2}}(2 \leqslant k \leqslant n+2$, where $\left.a>0, b>1, c>\sqrt[n]{\frac{1}{b}}\right)$.