I was teaching my high school students how to find the roots of 2nd degree equations like the following:
$\frac{x^2}{2}+\sqrt{3}x-\sqrt{2}=0$
In this case, using the formula we get:
$x=-\sqrt{3}\pm\sqrt{3-2\sqrt{2}}$
To simplify I writted $3-2\sqrt{2}$ as $(\sqrt{2}-1)^2$, so I get:
$x=-\sqrt{3}\pm(\sqrt{2}-1)$
In this case was simple to write $3-2\sqrt{2}$ as $(\sqrt{2}-1)^2$, there are some harder cases to find this factorization.
My question is when it's possible to write $a+b\sqrt{c}$ as $(m+n)^2$, and how to find these numbers $m$ and $n$?
Suppose $a+b\sqrt{c} = (m+n\sqrt{c})^2$, where $a$, $b$, $c$, $m$, and $n$ are integers and further that $c > 0$ (otherwise we are not talking about the real-valued square root or we are talking about $a+0 = a$). Then \begin{align*} a+b\sqrt{c} &= (m+n\sqrt{c})^2 \\ &= m^2 + cn^2 + 2 m n \sqrt{c} \\ \end{align*} This forces $b$ even. So, not possible if $b$ is odd. Then for each (partial) factorization $b = 2 x y$, where $x$ and $y$ are integers, can be $\pm 1$, and need not be prime, we have a solution if $x^2 + cy^2 = a$ or $y^2 + cx^2 = a$. In the former case, take $m = x$ and $n = y$. In the latter, take $m = y$ and $n = x$.
Applied to your example... We attempt to simplify $\sqrt{3+2\sqrt{2}}$, so $a = 3$, $b = c = 2$. Since the $2$ coefficient of the radical is even, there may be a solution. The (partial) factorizations of $2$ of the suitable form are $2 \cdot 1 \cdot 1$ and $2 \cdot -1 \cdot -1$. In the first case, $1^2 + 1^2 \cdot c = 3 = a$, as desired and we obtain $3 + 2\sqrt{2} = (1+1\sqrt{2})^2$. (The latter (partial) factorization gives $3+2\sqrt{2} = (-1-\sqrt{2})^2$, which is also true.)