[proofplan]
The strategy is to use the Commutative Gelfand-Naimark Theorem to transfer the problem from the abstract algebra $A$ to a function algebra $C(K)$, where the square root is constructed pointwise. Existence: let $B = A(x)$ be the closed $*$-subalgebra of $A$ generated by $x$ and the unit; since $x$ is Hermitian, $B$ is commutative unital $C^*$, isomorphic to $C(K)$ for some compact Hausdorff $K$. The image $f$ of $x$ is real-valued and non-negative (by spectral permanence, $f(K) = \sigma_A(x) \subset [0,\infty)$), so $g(k) := \sqrt{f(k)}$ is a continuous non-negative function on $K$, and pulling back gives the desired $y \in B$. Uniqueness within $B$ is by injectivity of the isomorphism $B \cong C(K)$ together with uniqueness of the pointwise square root of a non-negative function. Uniqueness within $A$ requires more: another positive square root $z \in A$ commutes with $x = z^2$, hence lies (together with $y$) in a commutative unital $C^*$-subalgebra containing $x$, and uniqueness in such a subalgebra gives $y = z$.
[/proofplan]
[step:Construct the commutative unital $C^*$-subalgebra $A(x)$ generated by $x$]
Define $A(x)$ to be the norm-closure in $A$ of the set of polynomial expressions in $x$ and $x^*$ together with the unit $1$:
\begin{align*}
A(x) := \overline{\{p(x, x^*) : p \in \mathbb{C}\langle X, Y\rangle\}}^{\|\cdot\|}.
\end{align*}
Since $x$ is Hermitian, $x^* = x$, so the polynomial subalgebra is in fact $\{p(x) : p \in \mathbb{C}[X]\}$, which is commutative. Its norm closure $A(x)$ is also commutative (continuity of multiplication), is closed under the involution (limits of self-adjoint elements are self-adjoint by continuity of the involution), and contains $1$. Hence $A(x)$ is a commutative unital $C^*$-subalgebra of $A$.
By [Spectrum in a Subalgebra](/theorems/2673), $\sigma_A(x) \subseteq \sigma_{A(x)}(x)$. By the previous theorem **Spectral Inclusions and Permanence** (part (3)) applied to the unital $C^*$-subalgebra $A(x) \subseteq A$ and the normal element $x \in A(x)$ (Hermitian elements are normal), we have
\begin{align*}
\sigma_{A(x)}(x) = \sigma_A(x).
\end{align*}
Combined with the hypothesis $\sigma_A(x) \subseteq [0, \infty)$, we have $\sigma_{A(x)}(x) \subseteq [0, \infty)$.
[/step]
[step:Transfer to $C(K)$ via the Commutative Gelfand-Naimark Theorem]
Apply the previous theorem **Commutative Gelfand-Naimark Theorem** to the commutative unital $C^*$-algebra $A(x)$. It produces a compact Hausdorff space $K$ and an isometric $*$-isomorphism
\begin{align*}
\theta: C(K) \to A(x).
\end{align*}
(In the previous theorem, the Gelfand map runs $A(x) \to C(\Phi_{A(x)})$; we let $K := \Phi_{A(x)}$ and $\theta := \Gamma^{-1}$, which is well-defined since $\Gamma$ is bijective and isometric.)
Define
\begin{align*}
f := \theta^{-1}(x) \in C(K).
\end{align*}
*$f$ is real-valued.* Since $\theta$ is a $*$-isomorphism, $\theta(\bar{f}) = \theta(f^*) = \theta(f)^* = x^* = x = \theta(f)$. Injectivity of $\theta$ gives $\bar{f} = f$, i.e.\ $f$ is real-valued.
*$f \geq 0$ pointwise.* For a function $f \in C(K)$, the spectrum in $C(K)$ is the image: $\sigma_{C(K)}(f) = f(K)$. (Indeed, $\lambda - f$ is invertible in $C(K)$ iff it is everywhere non-zero on $K$ iff $\lambda \notin f(K)$.) Since $\theta$ is a $*$-isomorphism, it preserves spectra: $\sigma_{C(K)}(f) = \sigma_{A(x)}(\theta(f)) = \sigma_{A(x)}(x)$. By Step 1, $\sigma_{A(x)}(x) \subseteq [0, \infty)$. Hence
\begin{align*}
f(K) = \sigma_{C(K)}(f) = \sigma_{A(x)}(x) \subseteq [0, \infty),
\end{align*}
i.e.\ $f(k) \geq 0$ for every $k \in K$.
[/step]
[step:Construct $y$ as the pull-back of the pointwise square root of $f$]
Define
\begin{align*}
g: K &\to \mathbb{R} \\
k &\mapsto \sqrt{f(k)}.
\end{align*}
Since $f \geq 0$ on $K$, the pointwise square root $g(k) = \sqrt{f(k)}$ is well-defined. The function $\sqrt{\,\cdot\,}: [0, \infty) \to [0, \infty)$ is continuous, and the composition of continuous functions is continuous, so $g \in C(K)$. By construction $g \geq 0$ pointwise and $g^2 = f$.
Set
\begin{align*}
y := \theta(g) \in A(x) \subseteq A.
\end{align*}
Then $y^* = \theta(g)^* = \theta(\bar{g}) = \theta(g) = y$ (since $g$ is real-valued), so $y$ is Hermitian. Also,
\begin{align*}
y^2 = \theta(g) \theta(g) = \theta(g^2) = \theta(f) = x,
\end{align*}
using multiplicativity of $\theta$. Finally,
\begin{align*}
\sigma_A(y) \overset{\text{permanence}}{=} \sigma_{A(x)}(y) = \sigma_{C(K)}(g) = g(K) \subseteq [0, \infty),
\end{align*}
where the first equality uses **Spectral Inclusions and Permanence** part (3) applied to the unital $C^*$-subalgebra $A(x) \subseteq A$ and the normal (in fact Hermitian) element $y \in A(x)$, and the second equality uses that $\theta$ is a $*$-isomorphism (preserving spectra). Hence $y$ is positive. This proves existence.
[/step]
[step:Prove uniqueness within $A(x)$ via the function-algebra isomorphism]
Suppose $z \in A(x)$ is positive with $z^2 = x$. Set $h := \theta^{-1}(z) \in C(K)$.
*$h$ is real-valued and non-negative.* Since $z$ is positive, $z = z^*$ (Hermitian) so $h = \bar{h}$ as in Step 2. Spectral permanence and $\theta^{-1}$ being a $*$-isomorphism give $\sigma_{C(K)}(h) = \sigma_A(z) \subseteq [0, \infty)$, so $h(K) \subseteq [0, \infty)$, i.e.\ $h \geq 0$ pointwise.
*$h^2 = f$.* From $z^2 = x$, applying the homomorphism $\theta^{-1}$:
\begin{align*}
h^2 = \theta^{-1}(z)^2 = \theta^{-1}(z^2) = \theta^{-1}(x) = f.
\end{align*}
For each $k \in K$, $h(k) \geq 0$ and $h(k)^2 = f(k) \geq 0$ has the unique non-negative real square root $\sqrt{f(k)} = g(k)$. Hence $h(k) = g(k)$ for every $k \in K$, i.e.\ $h = g$ in $C(K)$. Applying $\theta$:
\begin{align*}
z = \theta(h) = \theta(g) = y.
\end{align*}
This proves uniqueness within $A(x)$.
[/step]
[step:Prove uniqueness in $A$ by constructing a commutative $C^*$-subalgebra containing $x, y, z$]
Suppose $y, z \in A$ are both positive with $y^2 = z^2 = x$. We have already proved $y \in A(x)$. We show $z = y$.
*$z$ commutes with $x$.* By assumption $z = z^*$ (Hermitian), so
\begin{align*}
zx = z \cdot z^2 = z^3 = z^2 \cdot z = xz.
\end{align*}
*$z$ commutes with every element of $A(x)$.* The polynomial subalgebra $\{p(x) : p \in \mathbb{C}[X]\}$ commutes with $z$ by linearity, since $z$ commutes with $x$ and hence with every power $x^k$ (and the unit $1$). Norm-closure preserves the commutation relation: if $z$ commutes with each $a_n$ and $a_n \to a$ in norm, then by continuity of multiplication $za = \lim za_n = \lim a_n z = az$. Hence $z$ commutes with $A(x) = \overline{\{p(x) : p\}}$.
*Construct a commutative unital $C^*$-subalgebra $C$ of $A$ containing $x$, $y$, $z$.* Let $C$ be the norm-closure in $A$ of the set of polynomial expressions in $x, x^*, z, z^*$. Since $z$ commutes with $x = x^*$ and with $z^* = z$, and $x$ commutes with $x^* = x$ (as $x$ commutes with itself), this polynomial set is commutative. Its norm-closure $C$ is then a commutative unital $C^*$-subalgebra of $A$ (closed under involution because the polynomial set is, contains $1$, and closed in norm). By construction $x, z \in C$. Moreover $y \in A(x) \subseteq C$ (since $A(x)$ is the closure of polynomials in $x = x^*$, and these polynomials lie in our larger polynomial set).
*Apply the previous step to $C$.* The element $x$ is positive in $C$ as well: $\sigma_C(x) = \sigma_A(x)$ by **Spectral Inclusions and Permanence** part (3) applied to the unital $C^*$-subalgebra $C$ and the normal element $x \in C$. Both $y$ and $z$ are positive elements of $C$ with $y^2 = z^2 = x$. By Steps 1-4 applied to $C$ in place of $A$ (with the same construction $C(x) = A(x) \subseteq C$ in place of $A(x)$), uniqueness within the function-algebra image gives $y = z$. This proves uniqueness in $A$.
[guided]
The square root constructed in Steps 1-4 lives in the **smallest** commutative $C^*$-subalgebra containing $x$, namely $A(x)$. We obtained it via the Gelfand isomorphism $\theta: C(K) \to A(x)$ and the **pointwise square root** of the non-negative function $f = \theta^{-1}(x)$. This gives existence and uniqueness *inside* $A(x)$.
But the theorem claims uniqueness in *all of* $A$, not just $A(x)$. So we must rule out the existence of a positive $z \in A \setminus A(x)$ with $z^2 = x$. The strategy is to **enlarge** $A(x)$ to a commutative $C^*$-subalgebra $C$ containing both $y$ and the hypothetical $z$, then run the same uniqueness argument inside $C$.
**Why does $z$ commute with $x$?** Because $z$ is Hermitian (positive elements are by definition Hermitian) and $x = z^2$, so
\begin{align*}
zx = z \cdot z^2 = z^3 = z^2 \cdot z = xz.
\end{align*}
**Why does $z$ commute with every element of $A(x)$?** $z$ commutes with $x$ (just shown) and with $1$, so $z$ commutes with every element of the polynomial subalgebra $\{p(x) : p \in \mathbb{C}[X]\}$. By continuity of multiplication, $z$ commutes with the norm-closure $A(x)$. The same argument shows $z$ commutes with $y \in A(x)$.
**Why is $C$ commutative?** $C$ is the norm-closure of the set of polynomials in $\{x, x^*, z, z^*\} = \{x, z\}$ (since $x^* = x$ and $z^* = z$). The pairs $(x, z)$ commute (just established), and each commutes with itself. Hence the polynomial subalgebra is commutative; its closure is too.
**Why does $z$ live in $C$?** By construction.
**Why does $y$ live in $C$?** Because $y \in A(x)$ (Step 3), and $A(x)$ is contained in $C$: every polynomial in $x = x^*$ is also a polynomial in the larger generator set $\{x, x^*, z, z^*\}$, and norm-closures respect set inclusion.
**Now run the previous argument inside $C$.** By the previous theorem (**Spectral Inclusions and Permanence**, part (3)), applied to the unital $C^*$-subalgebra $C \subseteq A$ and the normal element $x \in C$, we get $\sigma_C(x) = \sigma_A(x) \subseteq [0, \infty)$. Hence $x$ is positive in $C$. By the Commutative Gelfand-Naimark Theorem applied to $C$, there is an isometric $*$-isomorphism $\theta_C: C(K_C) \to C$. Let $f_C = \theta_C^{-1}(x)$, $h_C = \theta_C^{-1}(z)$. Both are real-valued and non-negative on $K_C$ (same argument as Step 2-4). And $h_C^2 = f_C$. The pointwise unique non-negative square root forces $h_C = \sqrt{f_C}$. The same applies to $y$ (since $y \in C$): $\theta_C^{-1}(y) = \sqrt{f_C}$. Hence $\theta_C^{-1}(y) = \theta_C^{-1}(z)$, and applying $\theta_C$, $y = z$.
**Why this argument cannot be skipped.** A naive approach would say "$y \in A(x)$ and $z \in A(x)$ both square to $x$, so $y = z$ by the function-algebra argument." But we have not assumed $z \in A(x)$ — only that $z \in A$. The whole point of the uniqueness statement is that the square root in $A$ does *not* depend on the ambient subalgebra in which we construct it. Enlarging to $C$ is the device that compares both candidates inside a single commutative $C^*$-context.
[/guided]
[/step]