If $x^2-bx+a = 0$ and $x^2-ax+b = 0$ both have distinct positive integers roots, then what is $(a,b)$?
My Try: $$\displaystyle x^2-ax+b = 0\Rightarrow x = \frac{a\pm \sqrt{a^2-4b}}{2}$$
So here $a^2-4b$ is a perfect square.
Similarly $$\displaystyle x^2-bx+a = 0\Rightarrow x = \frac{b\pm \sqrt{b^2-4a}}{2}$$
So here $b^2-4a$ is a perfect square.
But I did not understand how can I solve after that.
Let the roots of $x^2 - ax +b$ be $r$ and $s$, and the roots of $x^2 - bx + a$ be $u$ and $v$. Then
$$\begin{align} r+s &= a\\ rs &= b\\ u+v &= b\\ uv &= a. \end{align}$$
Let, without loss of generality, $a \leqslant b$. Thus
$$\begin{align} uv &\leqslant u+v\\ \iff uv - u - v + 1 & \leqslant 1\\ \iff (u-1)(v-1) & \leqslant 1. \end{align}$$
So $u = 1$ or $v = 1$ or $u = v = 2$. But the roots are supposed to be distinct, hence $u = 1$ or $v = 1$. Without loss of generality, $u = 1$.
Thus $a = v = r+s$, $b = v+1 = rs$, so
$$rs = r+s+1 \iff (r-1)(s-1) = 2,$$
and that leaves $r = 2$, $s = 3$ (or vice versa), so $a = 5, b = 6$.