What are the common solutions of $x^2+y=31$ and $y^2+x=41$? A friend asked me if I have a certain algorithm to solve $x^2+y = 31$ and $y^2+x=41$ simultanously. We found the solutions but we didn't find a way to solve both equations.
Any ideas?

Rearranging gives $y^2 - x^2 = 10 + y-x,$ so that $(y-x) (y+x-1) = 10.$ You don't say you are looking for integer solutions, but if you are, then you are left with finitely many possibilities for the pair $(y-x,y+x-1),$ which can be individually solved by Gaussian elimination: for example, one possibility is $y-x = 2, y+x-1 =5,$ leading to $y = 4, x = 2.$ But this pair does not satisy the original equations. However, another possibility is $y-x = 1$ and $y+x-1 = 10,$ which leads to $y=6$ and $x=5,$ which does satisfy the original system. The other cases can be handled similarly.
