\(\dfrac{x\sqrt{x}-8}{x+2\sqrt{x}+4}+3\left(1-\sqrt{x}\right)\)
\(=\dfrac{\left(\sqrt{x}-2\right)\left(x+2\sqrt{x}+4\right)}{x+2\sqrt{x}+4}+3-3\sqrt{x}\)
\(=\sqrt{x}-2+3-3\sqrt{x}=-2\sqrt{x}+1\)
\(\dfrac{x\sqrt{x}-8}{x+2\sqrt{x}+4}+3\left(1-\sqrt{x}\right)\)
\(=\dfrac{\left(\sqrt{x}\right)^3-2^3}{x+2\sqrt{x}+4}+3\left(1-\sqrt{x}\right)\)
\(=\dfrac{\left(\sqrt{x}-2\right)\left(x+2\sqrt{x}+4\right)}{x+2\sqrt{x}+4}+3-3\sqrt{x}\)
\(=\sqrt{x}-2+3-3\sqrt{x}\)
\(=\left(1-3\right)\sqrt{x}+\left(-2+3\right)\)
\(=-2\sqrt{x}+1\)