2.
\(P=\dfrac{\sqrt{x-2018}}{x+2}+\dfrac{\sqrt{x-2019}}{x}\)\(P=\dfrac{\sqrt{\left(x-2018\right).2020}}{\left(x+2\right)\sqrt{2020}}+\dfrac{\sqrt{\left(x-2019\right).2019}}{\sqrt{2019}.x}\)
Áp dụng BĐT AM-GM:
\(\sqrt{\left(x-2018\right).2020}\le\dfrac{1}{2}\left(x-2018+2020\right)=\dfrac{1}{2}\left(x+2\right)\)
\(\sqrt{\left(x-2019\right).2019}\le\dfrac{1}{2}\left(x-2019+2019\right)=\dfrac{1}{2}x\)
\(\Rightarrow P\le\dfrac{x+2}{2\sqrt{2020}\left(x+2\right)}+\dfrac{x}{2\sqrt{2019}.x}=\dfrac{1}{2\sqrt{2020}}+\dfrac{1}{2\sqrt{2019}}\)
\("="\Leftrightarrow x=4038\)