2. Let $x, y$ be non-negative real numbers, $a=\sqrt{x}+\sqrt{y}, b=\sqrt{x+2}+\sqrt{y+2}$, if $a, b$ are two non-consecutive integers, find the values of $a, b$.

 untranslated text remains unchanged.
$$
b-a=\sqrt{x+2}+\sqrt{y+2}-(\sqrt{x}+\sqrt{y})=\frac{2}{\sqrt{x+2}+\sqrt{x}}+\frac{2}{\sqrt{y+2}+\sqrt{y}} \leqslant 2 \sqrt{2} \text {, }
$$

Given that $a, b$ are two non-consecutive integers, then $b-a=2$.
$$
\begin{array}{l}
\text { Let }\left\{\begin{array} { l } 
{ \sqrt { x } + \sqrt { y } = n , } \\
{ \sqrt { x + 2 } + \sqrt { y + 2 } = n + 2 }
\end{array} \Rightarrow \left\{\begin{array}{l}
x+y+2 \sqrt{x y}=n^{2}, \\
x+y+2 \sqrt{(x+2)(y+2)}=n^{2}+4 n
\end{array}\right.\right. \\
\Rightarrow \sqrt{(x+2)(y+2)}=2 n+\sqrt{x y} \Rightarrow x+y+2=2 n^{2}+2 n \sqrt{x y} \\
\Rightarrow n^{2}-2 \sqrt{x y}+2=2 n^{2}+2 n \sqrt{x y} \Rightarrow 2=n^{2}+(2 n+2) \sqrt{x y} \geqslant n^{2} \Rightarrow n=1 \text {. } \\
\text { Thus }\left\{\begin{array}{l}
\sqrt{x y}=\frac{1}{4}, \\
\sqrt{x}+\sqrt{y}=1
\end{array} \Rightarrow x=y=\frac{1}{4} \Rightarrow a=1, b=3 .\right. \\
\end{array}
$$