a: \(A=\dfrac{\sqrt{x}-1+\sqrt{x}}{\sqrt{x}\left(1-\sqrt{x}\right)}:\left(\dfrac{-\left(2x+\sqrt{x}-1\right)\left(x-\sqrt{x}+1\right)+\left(2x\sqrt{x}+x-\sqrt{x}\right)\left(\sqrt{x}-1\right)}{\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)\left(x-\sqrt{x}+1\right)}\right)\)
\(=\dfrac{2\sqrt{x}-1}{\sqrt{x}\left(1-\sqrt{x}\right)}:\dfrac{-2x^2+x\sqrt{x}-2\sqrt{x}+1+2x^2-x\sqrt{x}-2x+\sqrt{x}}{\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)\left(x-\sqrt{x}+1\right)}\)
\(=\dfrac{-\left(2\sqrt{x}-1\right)}{\sqrt{x}\left(\sqrt{x}-1\right)}\cdot\dfrac{\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)\left(x-\sqrt{x}+1\right)}{-2x-\sqrt{x}+1}\)
\(=\dfrac{-\left(2\sqrt{x}-1\right)\left(\sqrt{x}+1\right)\left(x-\sqrt{x}+1\right)}{-\sqrt{x}\left(2x+\sqrt{x}-1\right)}\)
\(=\dfrac{\left(2\sqrt{x}-1\right)\left(\sqrt{x}+1\right)\left(x-\sqrt{x}+1\right)}{\sqrt{x}\left(\sqrt{x}+1\right)\left(2\sqrt{x}-1\right)}\)
\(=\dfrac{x-\sqrt{x}+1}{\sqrt{x}}\)
b: Thay \(x=17-12\sqrt{2}=\left(3-2\sqrt{2}\right)^2\) vào A, ta được:
\(A=\dfrac{17-12\sqrt{2}-\sqrt{2}+1+1}{3-2\sqrt{2}}=\dfrac{19-13\sqrt{2}}{3-2\sqrt{2}}=5-\sqrt{2}\)