How many solutions are there to following diophantine equations? (or, asymptotically?)
For positive integers $A, B$, $A-x, B+x, x$ is all perfect square.
First of all, the number of solutions $(m,n)$ that $A=m^2+n^2$ is $r'_2(A)$, that one can look up for explicit formula in here. http://mathworld.wolfram.com/SumofSquaresFunction.html
Therefore above the number of solution above must be less or equal to $r'_2(A)$. Now, a heuristic argument comes in. One can suppose that chance of $B+x$ being a perfect square is about $O(\frac{1}{\sqrt(B)})$, therefore vaguely one can argue that above solution has upper bound of $O(\frac{r'_2(A)}{\sqrt(B)})$. But notice that this argument has so many flaws on so many levels. Would anyone like to consider this problem? Or is this problem already quite famously solved?
Suppose that you indeed mean
One trivial bound for number of solutions is $A$. Indeed, if $A < x$, then $A - x < 0$ and thus cannot be a perfect square.
Now, suppose that $x = k^2$, $A-x = m^2$, $B+x = k^2$. It follows that $B = n^2 - k^2 = (n+k)\cdot (n-k)$. Suppose that $B = r \cdot s$. It follows that $n = \frac{r+s}2$, $k = \frac{r-s}2$. That defines bijection between paris $(n, k)$ and $(r, s)$ and thus the number of solutions is at most half of the number of factors of $B$ (since we consider ordered pairs only, as $n > k$).