<s>[INST] Find the positive integers pair $(x, y)$ such that $xy^2 + y + 1 \mid x^2y + x + y$. 
Find the positive integers pair $(x, y)$ such that $xy^2 + y + 1 \mid x^2y + x + y$.

We have that $xy^2 + y + 1 \mid x^2y + x + y \implies xy^2 + y + 1 \mid y(x^2y + x + y) - x(xy^2 + y + 1)$
$\iff xy^2 + y + 1 \mid y^2 - x \implies xy^2 + y + 1 \mid xy^2 + y + 1 - x(y^2 - x)$
$\iff xy^2 + y + 1 \mid x^2 + y + 1 \implies xy^2 + y + 1 \le x^2 + y + 1$
$\iff xy^2 \le x^2 \iff y^2 \le x$. And I don't know what to do next.
This problem is adapted from a recent competition.
 [/INST] You have obtained that $xy^2+y+1 \mid x^2+y+1$, so $x \geq y^2$.
If $x=y^2$, then obviously all pairs of the form  $(k^2,k) $ are solutions.
If $x >y^2$, then we let $x=My^2+N$ with $N<y^2$. If $N=0$ then $x=My^2$ so $My^4+y+1 \mid M^2y^4+y+1$ and so $My^4+y+1 \mid My+M-y-1$, which is impossible due to bounding reasons. So $N \geq 1$
Then substituting, we obtain $My^4+Ny^2+y+1 \mid M^2y^4+2MNy^2+y+1+N^2$.
Obviously, $My^4+Ny^2+y+1 \mid M^2y^4+MNy^2+My+M$, so we obtain $My^4+Ny^2+y+1 \mid MNy^2+y+1+N^2-My-M$.
We claim that $MNy^2+y+1+N^2-My-M \geq 0$.
It suffices to show that $MNy^2+y+1+N^2 \geq My+M$.
That's almost obvious, since $MNy^2+y+1+N^2 \geq My^2+y+2 \geq M(y+1)=My+M$ for $y >1$. If $y=1$, then from the initial divisibility we obtain $x=1$, which is a solution that we have obtained before.
So, the claim is proved and :
Since $My^4+Ny^2+y+1 \mid MNy^2+y+1+N^2-My-M$, we have that $My^4+Ny^2 \leq MNy^2-N^2-My-M$, so $MNy^2 \geq My^4 \Rightarrow N \geq y^2$ a contradiction
Finally, all solutions are of the form $(k^2,k)$ with $k$ an integer.
</s>