5. Given the sequence $\left\{a_{n}\right\}$ satisfies $a_{1}=2, a_{2}=6$, and $\frac{a_{n+2}+a_{n}}{a_{n+1}+1}=2$. Then $\lim _{n \rightarrow+\infty} \frac{\sqrt{a_{1}}+\sqrt{a_{2}}+\cdots+\sqrt{a_{n}}}{n^{2}}$ $=$ . $\qquad$
5. $\frac{1}{2}$.

From the given, we have $a_{n+2}-a_{n+1}=a_{n+1}-a_{n}+2$, thus,
$$
a_{n+1}-a_{n}=\left(a_{2}-a_{1}\right)+2(n-1)=2(n+1) \text {. }
$$

Therefore, $a_{n}=\left(a_{n}-a_{{n}-1}\right)+\left(a_{n-1}-a_{n-2}\right)+\cdots+$
$$
\begin{array}{c}
\left(a_{2}-a_{1}\right)+a_{1} \\
=2(n+n-1+\cdots+2)+2=n(n+1) .
\end{array}
$$

Thus, $\frac{1}{n^{2}} \sum_{i=1}^{n} \sqrt{a_{i}}=\frac{1}{n^{2}} \sum_{i=1}^{n} \sqrt{i(i+1)}$
$$
<\frac{1}{n^{2}} \sum_{i=1}^{n}(i+1)=\frac{n+3}{2 n} \text {. }
$$

Therefore, $\lim _{n \rightarrow+\infty} \frac{1}{n^{2}} \sum_{i=1}^{n} \sqrt{a_{i}} \leqslant \lim _{n \rightarrow+\infty} \frac{n+3}{2 n}=\frac{1}{2}$.
On the other hand,
$$
\lim _{n \rightarrow+\infty} \frac{1}{n^{2}} \sum_{i=1}^{n} \sqrt{a_{i}} \geqslant \lim _{n \rightarrow+\infty} \frac{1}{n^{2}} \sum_{i=1}^{n} i=\lim _{n \rightarrow+\infty} \frac{n+1}{2 n}=\frac{1}{2} \text {. }
$$

Therefore, $\lim _{n \rightarrow+\infty} \frac{1}{n^{2}} \sum_{i=1}^{n} \sqrt{a_{i}}=\frac{1}{2}$ holds.