Finding pairs of integers such that $x^2+3y$ and $y^2+3x$ are both perfect squares

Not a complete solution but an approach that seems like it will work.

Assume $y \gt x$

Then we have that

$(y+2)^2 \gt y^2 + 3y \gt y^2+3x \gt y^2$

If $y^2 + 3x$ was a perfect square, then we have that $y^2 + 3x = (y+1)^2$.

This gives us $3x = 2y+1$.

Substitute in the other expression, and form similar inequalities. This will narrow down to few small cases to consider.

To elaborate, given $3x = 2y+1$

$x^2 + 3y = x^2 + \frac{9x-3}{2} \lt (x+3)^2$

Thus $x^2 + 3y$ is either $(x+1)^2$ or $(x+2)^2$.

Thus we have that

$3y = 2x+1$ or $3y = 4x + 4$.

Substitute $y = \frac{3x -1}{2}$ and solve the linear equation in $x$ and compute $y$. In the end, don't forget to verify that both the expressions are indeed perfect squares.

The other case $y=x$ can be treated similarly.