\(2x^2-3x\sqrt{x+3}+\left(x+3\right)\)
\(=2x^2-2x\sqrt{x+3}-x\sqrt{x+3}+\left(\sqrt{x+3}\right)^2\)
\(=2x\left(x-\sqrt{x+3}\right)-\sqrt{x+3}\left(x-\sqrt{x+3}\right)\)
\(=\left(2x-\sqrt{x+3}\right)\left(x-\sqrt{x+3}\right)\)
\(2x^2-3x\sqrt{x+3}+\left(x+3\right)\)
\(=2x^2-x\sqrt{x+3}-2x\sqrt{x+3}+\left(\sqrt{x+3}\right)^2\)
\(=x\left(2x-\sqrt{x+3}\right)-\sqrt{x+3}\left(2x-\sqrt{x+3}\right)\)
\(=\left(x-\sqrt{x+3}\right)\left(2x-\sqrt{x+3}\right)\)