Find all positive integer pairs $(a, b)$ such that $(a b+a+b) \mid a^{2}+b^{2}-2$.

Translate the text above into English, please keep the original text's line breaks and format, and output the translation result directly.
II. Solution: By symmetry, without loss of generality, let $a \geq b$.
Let $t=\frac{a^{2}+b^{2}-2}{a b+a+b}$, then $t \in \mathbb{N}$. We will prove that $t$ can only be 0 or 1.
For a fixed $t$, assume $(a, b)$ is a solution that satisfies the condition and makes $b$ the smallest. Therefore, $x=a$ is a positive integer solution of $t=\frac{x^{2}+b^{2}-2}{x b+x+b}$. Rearranging, we get $x^{2}-t(b+1) x+b^{2}-b t-2=0$. Let the other root be $a_{1}$, then $a+a_{1}=t(b+1)$ and $a a_{1}=b^{2}-b t-2$. Clearly, $a_{1}=t(b+1)-a \in \mathbb{Z}$. If $a_{1}>0$, then $(a_{1}, b)$ and $(b, a_{1})$ are both positive integer solutions of the equation, so $a_{1} \geq b$, leading to $b^{2}-b t-2=a a_{1} \geq b^{2}$, a contradiction! Hence, $a_{1} \leq 0$.
(1) If $a_{1}=0$, then $b^{2}-b t-2=0$, yielding $b=2, t=1$, and substituting gives $a=3$;
(2) If $a_{1}<0$, we have $b^{2}-b t-2=a a_{1} \leq -a < -t(b+1)$, which simplifies to $b^{2}+t<2$, so $b=1, t=0$, and substituting gives $a=1$.
Combining (1) and (2) and considering symmetry, the positive integer solutions $(a, b)=(1,1),(2,3),(3,2)$, a total of three.