(a) Viết lại được:
\(B=\left[\dfrac{15-\sqrt{x}}{\left(\sqrt{x}+5\right)\left(\sqrt{x}-5\right)}+\dfrac{2}{\sqrt{x}+5}\right]\cdot\dfrac{\sqrt{x}-5}{\sqrt{x}+1}\)
\(=\dfrac{15-\sqrt{x}+2\left(\sqrt{x}-5\right)}{\left(\sqrt{x}+5\right)\left(\sqrt{x}-5\right)}\cdot\dfrac{\sqrt{x}-5}{\sqrt{x}+1}\)
\(=\dfrac{\sqrt{x}+5}{\left(\sqrt{x}+5\right)\left(\sqrt{x}-5\right)}\cdot\dfrac{\sqrt{x}-5}{\sqrt{x}+1}\)
\(=\dfrac{1}{\sqrt{x}+1}.\)
(b) \(P=AB=\dfrac{4\left(\sqrt{x}+1\right)}{25-x}\cdot\dfrac{1}{\sqrt{x}+1}=\dfrac{4}{25-x}\)
\(P\in Z\Rightarrow\left(25-x\right)\inƯ\left(4\right)=\left\{\pm1;\pm2\right\}\)
Để \(P\) đạt GTLN thì \(\left\{{}\begin{matrix}\left(25-x\right)_{min}\\25-x>0\end{matrix}\right.\Rightarrow25-x=1\Leftrightarrow x=24\) (thỏa mãn).
Vậy: \(x=24.\)