<s>[INST] Find real solution $x$ in order to $x + \sqrt{2020}$ and $\dfrac{5}{x} -\sqrt{2020}$ are integers $x + \sqrt{2020}$ and $\dfrac{5}{x} - \sqrt{2020}$ are integers
$\Rightarrow x + \dfrac{5}{x}$ is an integer
$\Rightarrow \dfrac{x^2 + 5}{x}$ is an integer
$\Rightarrow x^2 + 5\ \vdots\ x$
$\Rightarrow x^2 + 5 - x^2\ \vdots\ x$
$\Rightarrow 5\ \vdots\ x$
Is it the right way?
Any idea? Or any better way to solve this problem?
Please help !!!
 [/INST] As Edward H's question comment hint suggests, let $a$ be the integer where
$$a = x + \sqrt{2020} \implies x = a - \sqrt{2020} \tag{1}\label{eq1A}$$
Then let $b$ be the other integer, and use \eqref{eq1A}, to get
$$\begin{equation}\begin{aligned}
b & = \frac{5}{a - \sqrt{2020}} - \sqrt{2020} \\
b + \sqrt{2020} & = \frac{5}{a - \sqrt{2020}} \\
(b + \sqrt{2020})(a - \sqrt{2020}) & = 5 \\
ab - b\sqrt{2020} + a\sqrt{2020} - 2020 & = 5 \\
ab + \sqrt{2020}(-b + a) & = 2025 \\
\end{aligned}\end{equation}\tag{2}\label{eq2A}$$
Since $ab$ and $2025$ are integers, this means $\sqrt{2020}(-b + a)$ must also be an integer. However, due to $\sqrt{2020}$ being irrational and $-b + a$ being an integer, this is only possible if it's $0$, i.e.,
$$b = a \tag{3}\label{eq3A}$$
Using this in \eqref{eq2A} gives
$$a^2 = 2025 \implies a = \pm 45 \tag{4}\label{eq4A}$$
Finally, \eqref{eq1A} gives that
$$x = a - \sqrt{2020} \implies x = \pm 45 - \sqrt{2020} \tag{5}\label{eq5A}$$
</s>