Task 1. Determine all pairs $(a, b)$ of positive integers for which

$$
a^{2}+b \mid a^{2} b+a \quad \text { and } \quad b^{2}-a \mid a b^{2}+b
$$
Solution. From $a^{2}+b \mid a^{2} b+a$ it follows that

$$
a^{2}+b \mid\left(a^{2} b+a\right)-b\left(a^{2}+b\right)=a-b^{2} .
$$

From $b^{2}-a \mid a b^{2}+b$ it follows that

$$
b^{2}-a \mid\left(a b^{2}+b\right)-a\left(b^{2}-a\right)=b+a^{2} .
$$

We see that $a^{2}+b\left|a-b^{2}\right| a^{2}+b$. This means that $a^{2}+b$ is equal to $a-b^{2}$ up to a sign. Therefore, we have two cases: $a^{2}+b=b^{2}-a$ and $a^{2}+b=a-b^{2}$. In the second case, $a^{2}+b^{2}=a-b$. But $a^{2} \geq a$ and $b^{2} \geq b > -b$, so this is impossible. Therefore, we must have the first case: $a^{2}+b=b^{2}-a$. This gives $a^{2}-b^{2}=-a-b$, so $(a+b)(a-b)=-(a+b)$. Since $a+b$ is positive, we can divide by it and get $a-b=-1$, so $b=a+1$. All pairs that can satisfy the conditions are thus of the form $(a, a+1)$ for a positive integer $a$.

We check these pairs. We have $a^{2}+b=a^{2}+a+1$ and $a^{2} b+a=a^{2}(a+1)+a=$ $a^{3}+a^{2}+a=a\left(a^{2}+a+1\right)$, so the first divisibility relation is satisfied. Furthermore, $b^{2}-a=(a+1)^{2}-a=a^{2}+a+1$ and $a b^{2}+b=a(a+1)^{2}+(a+1)=a^{3}+2 a^{2}+2 a+1=$ $a\left(a^{2}+a+1\right)+a^{2}+a+1=(a+1)\left(a^{2}+a+1\right)$, so the second divisibility relation is also satisfied. The pairs $(a, a+1)$ thus satisfy the conditions and are therefore the exact solutions.