\(a,P=\dfrac{\left(\sqrt{x}-\sqrt{2}\right)\left(x+\sqrt{2x}+2\right)}{x+\sqrt{2x}+2}=\sqrt{x}-\sqrt{2}=\sqrt{\left(1-\sqrt{2}\right)^2}-\sqrt{2}=\sqrt{2}-1-\sqrt{2}=-1\\ b,=\sqrt{5-2\sqrt{2+\sqrt{\left(2\sqrt{2}+1\right)^2}}}\\ =\sqrt{5-2\sqrt{3+2\sqrt{2}}}=\sqrt{5-2\sqrt{\left(\sqrt{2}+1\right)^2}}\\ =\sqrt{3-2\sqrt{2}}=\sqrt{\left(\sqrt{2}-1\right)^2}=\sqrt{2}-1\)