Case 1: $a=b>1$
$a^2-a|a^2+a$ or $a^2-a|2a$. So, $a \le 3$. Checking the values, we get $a=2$ and $a=3$.
Case 2: $a \neq b$
WLOG $a>b$
$a^2-b|b^2+a \Rightarrow b^2+a \ge a^2-b \Rightarrow b(b+1) \ge a(a-1)$. As $a>b$, we get $b+1>a-1 \Rightarrow a-b<2 \Rightarrow a=b+1$.
$b^2-a|a^2+b \Rightarrow b^2-b-1|b^2+3b+1 \Rightarrow b^2-b-1|4b+2$ which is obviously true for $b=1$. Now consider $b>1$ and then $b^2-b-1 \le 4b+2$ which is true for $b \le 5$ . Checking, we get the only possible value of $b$ is $2$.
All the solutions are $(a,b)=(2,2),(3,3),(2,1),(3,2)$ and permutations.