a: \(P=\left(\sqrt{x}+\sqrt{2}+\sqrt{x}-\sqrt{2}\right)\cdot\dfrac{4+\sqrt{x}+1+x+\sqrt{x}}{x+\sqrt{x}}\)
\(=2\sqrt{x}\cdot\dfrac{x+2\sqrt{x}+5}{x+\sqrt{x}}=\dfrac{2x+4\sqrt{x}+10}{\sqrt{x}+1}\)
b: \(P=2\left(\sqrt{x}+3\right)\)
\(\Leftrightarrow x+2\sqrt{x}+5=\left(\sqrt{x}+1\right)\left(\sqrt{x}+3\right)\)
\(\Leftrightarrow x+4\sqrt{x}+3=x+2\sqrt{x}+5\)
=>x=1