\(P=A\left(3-x+2\sqrt{x}\right)=A\left(3-\sqrt{x}\right)\left(\sqrt{x}+1\right)\\ P=\dfrac{2\sqrt{x}-1}{\sqrt{x}+1}\left(3-\sqrt{x}\right)\left(\sqrt{x}+1\right)=\left(2\sqrt{x}-1\right)\left(3-\sqrt{x}\right)\\ P=6\sqrt{x}-2x-3+\sqrt{x}=-2x+7\sqrt{x}-3\\ P=-2\left(x-2\cdot\dfrac{7}{4}\sqrt{x}+\dfrac{49}{16}-\dfrac{49}{16}\right)-3\\ P=-2\left(\sqrt{x}-\dfrac{7}{4}\right)^2+\dfrac{49}{8}-3\le\dfrac{49}{8}-3=\dfrac{25}{8}\\ P_{max}=\dfrac{25}{8}\Leftrightarrow\sqrt{x}=\dfrac{7}{4}\Leftrightarrow x=\dfrac{49}{16}\)