I'm assuming that there's a typo and you mean
[tex]\sqrt{9-n} = \sqrt{\dfrac{n}{2}}[/tex]
We must use two key facts: the square root is defined only for non-negative inputs, so we must require
[tex]\begin{cases}9-n\geq 0\\\frac{n}{2}\geq 0\end{cases} \iff \begin{cases}n\leq 9\\n\geq 0\end{cases}[/tex]
So, we will only accept values in the range
[tex]0 \leq n \leq 9[/tex]
Secondly, where defined, the square root is an injective function. This means that you can only have two equal outputs if you start from two equal inputs:
[tex]\sqrt{x}=\sqrt{y}\iff x=y[/tex]
So, in your case, we have
[tex]\sqrt{9-n} = \sqrt{\dfrac{n}{2}} \iff 9-n = \dfrac{n}{2}[/tex]
Adding n to both sides gives
[tex]9 = \dfrac{3n}{2} \iff 3n = 18 \iff n = 6 [/tex]