Square root of 9 from a technical perspective. When we say $$  \sqrt{9}= x $$
then $\;x = 3,\;$ right?
So why when we square both sides it becomes different:
$$ (\sqrt{9})^2 = x^2$$
$$9 = x^2$$
Here $\;x =\pm 3.$
So, does $\;x = \pm 3\;$ in $\sqrt{9} = x?$

Just because $A$ is something that does $P$, does not mean that $A$ is the ONLY thing that does $P$.
It is true that $3^2 = 9$ but $3$ is not the only thing that when squared will equal $9$.
so $3^2 =9$ and $w^2 = 9$ does not in any way mean that $w = 3$.
This is no more valid or reasonable than saying $(1)^2- 3(1) +7 = 5$ and $(2^2 - 3(2) + 7 = 5$ and therefor $1 = 2$.
Or saying if Fred is a member of the chess club, and Betty is a member of the chess club, then Fred and Betty are the same person.
....
Your confusion is based on what is the definition of $\sqrt{9}$.
The definition of $\sqrt{k}$ has TWO parts.  If $\sqrt{k} = m$ then TWO things must be true:  1)  $m^2 = k$....  It's a common mistake to think this is the only thing that must be true but we must also have  2)  $m \ge 0$.
So although $3^2 = 9$ and $(-3)^2 = 9$ so both have 1) true.   $3>0$ but $-3< 0$ so only $3$ has 2) true and $-3$ has 2) false.
So $\sqrt 9 = 3$ and $-3\ne \sqrt 9$.
Now just because $3 = \sqrt 9$.  ANd $(\sqrt 9)^2 = 9$, it does not follow that $\sqrt 9$ is the ONLY thing that when squared equals $9$.  $\sqrt 9$ is only one thing that when squared equals $9$.
Just like Fred isn't the only member of the chess club and Betty can also be a member; $\sqrt 9$ is not the only thing that when squared is equal to $9$.  $-3$ when squared is also equal to $9$ when squared.
