$\sqrt{\frac{x-2\sqrt{x}+1}{x+2\sqrt{x}+1}}\\=\sqrt{\frac{(\sqrt{x})^2-2\sqrt{x}.1+1}{(\sqrt{x})^2+2\sqrt{x}.1+1}}\\=\sqrt{\frac{(\sqrt{x}-1)^2}{(\sqrt{x}+1)^2}}\\=\frac{\sqrt{(\sqrt{x}-1)^2)}}{\sqrt{(\sqrt{x}+1)^2}}\\=\frac{\left | \sqrt{x}-1 \right |}{\left | \sqrt{x}+1 \right |}\\=\frac{1-\sqrt{x}}{\sqrt{x}+1}$