[proofplan]
We first extend the state $\rho$ from the closed linear subspace $B\subset A$ to a bounded complex linear functional on all of $A$ by the complex [Hahn-Banach theorem](/theorems/879), preserving its norm. Since $A$ and $B$ have the same unit, the extension still takes the value $1$ at the unit. The remaining point is to prove a standard characterization: a complex linear functional $\phi$ on a unital C*-algebra satisfying $\|\phi\|=\phi(1)=1$ is positive. Applying that characterization to the Hahn-Banach extension gives a positive normalized extension, hence a state.
[/proofplan]
[step:Extend the state by complex Hahn-Banach with unchanged norm]
Because $\rho$ is a state on the unital C*-algebra $B$, it is positive and satisfies $\rho(1_A)=1$. By [citetheorem:8557], applied to the positive linear functional $\rho:B\to\mathbb C$, its operator norm is
\begin{align*}
\|\rho\|_{B^*}=\rho(1_A)=1.
\end{align*}
Regard $B$ as a complex linear subspace of the normed complex [vector space](/page/Vector%20Space) $A$, with the norm inherited from $A$. By the complex Hahn-Banach theorem for normed complex vector spaces (citing a result not yet in the wiki: complex Hahn-Banach theorem for normed complex vector spaces), there exists a complex linear functional
\begin{align*}
\widetilde{\rho}:A\to\mathbb C
\end{align*}
such that $\widetilde{\rho}|_B=\rho$ and
\begin{align*}
\|\widetilde{\rho}\|_{A^*}=\|\rho\|_{B^*}=1.
\end{align*}
Since $1_A\in B$ and the units of $A$ and $B$ agree, the extension property gives
\begin{align*}
\widetilde{\rho}(1_A)=\rho(1_A)=1.
\end{align*}
[/step]
[step:Prove that every norm-one unital functional is positive]
[claim:Norm-one unital functionals on unital C*-algebras are positive]
Let $D$ be a unital C*-algebra with unit $1_D$, and let $\phi:D\to\mathbb C$ be a complex linear functional satisfying
\begin{align*}
\|\phi\|_{D^*}=1
\end{align*}
and
\begin{align*}
\phi(1_D)=1.
\end{align*}
Then $\phi(x)\ge 0$ for every positive element $x\in D$.
[/claim]
[proof]
Let $h\in D$ be self-adjoint and assume $\|h\|_D\le 1$. For each $t\in\mathbb R$, the C*-identity and submultiplicativity give
\begin{align*}
\|1_D+ith\|_D^2=\|(1_D+ith)^*(1_D+ith)\|_D.
\end{align*}
Since $h^*=h$ and $t\in\mathbb R$,
\begin{align*}
(1_D+ith)^*(1_D+ith)=(1_D-ith)(1_D+ith)=1_D+t^2h^2.
\end{align*}
Therefore
\begin{align*}
\|1_D+ith\|_D^2=\|1_D+t^2h^2\|_D\le \|1_D\|_D+t^2\|h^2\|_D.
\end{align*}
Using $\|1_D\|_D=1$ and $\|h^2\|_D\le \|h\|_D^2\le 1$, we obtain
\begin{align*}
\|1_D+ith\|_D\le (1+t^2)^{1/2}.
\end{align*}
Write $\phi(h)=\alpha+i\beta$, where $\alpha,\beta\in\mathbb R$. Since $\|\phi\|_{D^*}=1$ and $\phi(1_D)=1$,
\begin{align*}
|1+it\phi(h)|=|\phi(1_D+ith)|\le \|1_D+ith\|_D\le (1+t^2)^{1/2}.
\end{align*}
Squaring both sides gives
\begin{align*}
(1-t\beta)^2+t^2\alpha^2\le 1+t^2.
\end{align*}
Equivalently,
\begin{align*}
-2t\beta+t^2(\alpha^2+\beta^2)\le t^2.
\end{align*}
For $t>0$, dividing by $t$ gives
\begin{align*}
-2\beta+t(\alpha^2+\beta^2)\le t.
\end{align*}
Letting $t\to 0$ through positive [real numbers](/page/Real%20Numbers) yields $\beta\ge 0$. For $t<0$, dividing by $t$ reverses the inequality and gives
\begin{align*}
-2\beta+t(\alpha^2+\beta^2)\ge t.
\end{align*}
Letting $t\to 0$ through negative real numbers yields $\beta\le 0$. Hence $\beta=0$, so $\phi(h)\in\mathbb R$ for every self-adjoint $h\in D$ with $\|h\|_D\le 1$. If $k\in D$ is self-adjoint and nonzero, applying this to $h=k/\|k\|_D$ gives $\phi(k)\in\mathbb R$; the case $k=0$ is immediate. Thus $\phi$ is real-valued on all self-adjoint elements of $D$.
Now let $x\in D$ be positive. If $x=0$, then $\phi(x)=0$. Assume $x\ne 0$, and define
\begin{align*}
h:=\frac{x}{\|x\|_D}.
\end{align*}
Then $h$ is positive and $\|h\|_D=1$. By the standard C*-order norm fact for positive contractions, $0\le h\le 1_D$, so $1_D-h$ is positive and
\begin{align*}
\|1_D-h\|_D\le 1.
\end{align*}
The element $1_D-h$ is self-adjoint, so $\phi(1_D-h)\in\mathbb R$. Moreover,
\begin{align*}
|\phi(1_D-h)|\le \|\phi\|_{D^*}\|1_D-h\|_D\le 1.
\end{align*}
Since $\phi(1_D)=1$,
\begin{align*}
\phi(1_D-h)=1-\phi(h).
\end{align*}
Thus
\begin{align*}
-1\le 1-\phi(h)\le 1.
\end{align*}
In particular, $\phi(h)\ge 0$. Multiplying by the positive scalar $\|x\|_D$ gives
\begin{align*}
\phi(x)=\|x\|_D\phi(h)\ge 0.
\end{align*}
Therefore $\phi$ is positive.
[guided]
We prove the criterion from the ground up because this is the point where positivity enters. Let $D$ be a unital C*-algebra with unit $1_D$, and let $\phi:D\to\mathbb C$ be complex linear with $\|\phi\|_{D^*}=1$ and $\phi(1_D)=1$. The goal is to show that $\phi(x)\ge 0$ whenever $x\in D$ is positive.
First we show that $\phi$ takes real values on self-adjoint elements. Let $h\in D$ be self-adjoint and satisfy $\|h\|_D\le 1$. For a real parameter $t\in\mathbb R$, we estimate $1_D+ith$. The reason for this particular element is that the C*-identity turns its norm into a norm involving $h^2$, while applying $\phi$ to it exposes the imaginary part of $\phi(h)$.
By the C*-identity,
\begin{align*}
\|1_D+ith\|_D^2=\|(1_D+ith)^*(1_D+ith)\|_D.
\end{align*}
Because $h^*=h$ and $t$ is real,
\begin{align*}
(1_D+ith)^*(1_D+ith)=(1_D-ith)(1_D+ith)=1_D+t^2h^2.
\end{align*}
Therefore, using the triangle inequality and submultiplicativity of the C*-norm,
\begin{align*}
\|1_D+ith\|_D^2=\|1_D+t^2h^2\|_D\le \|1_D\|_D+t^2\|h^2\|_D.
\end{align*}
Since $D$ is unital, $\|1_D\|_D=1$, and since $\|h\|_D\le 1$,
\begin{align*}
\|h^2\|_D\le \|h\|_D^2\le 1.
\end{align*}
Thus
\begin{align*}
\|1_D+ith\|_D\le (1+t^2)^{1/2}.
\end{align*}
Now write $\phi(h)=\alpha+i\beta$ with $\alpha,\beta\in\mathbb R$. The boundedness of $\phi$ gives
\begin{align*}
|1+it\phi(h)|=|\phi(1_D+ith)|\le \|\phi\|_{D^*}\|1_D+ith\|_D.
\end{align*}
Using $\|\phi\|_{D^*}=1$, this becomes
\begin{align*}
|1+it\phi(h)|\le (1+t^2)^{1/2}.
\end{align*}
Since
\begin{align*}
1+it(\alpha+i\beta)=1-t\beta+it\alpha,
\end{align*}
squaring absolute values gives
\begin{align*}
(1-t\beta)^2+t^2\alpha^2\le 1+t^2.
\end{align*}
Expanding and cancelling $1$ from both sides yields
\begin{align*}
-2t\beta+t^2(\alpha^2+\beta^2)\le t^2.
\end{align*}
For positive $t$, division by $t$ preserves the inequality:
\begin{align*}
-2\beta+t(\alpha^2+\beta^2)\le t.
\end{align*}
Letting $t\to 0$ through positive real numbers gives $\beta\ge 0$. For negative $t$, division by $t$ reverses the inequality:
\begin{align*}
-2\beta+t(\alpha^2+\beta^2)\ge t.
\end{align*}
Letting $t\to 0$ through negative real numbers gives $\beta\le 0$. Hence $\beta=0$, and therefore $\phi(h)\in\mathbb R$.
This proves reality for self-adjoint contractions. If $k\in D$ is any nonzero self-adjoint element, then $k/\|k\|_D$ is a self-adjoint contraction, so $\phi(k/\|k\|_D)\in\mathbb R$. By complex linearity,
\begin{align*}
\phi(k)=\|k\|_D\phi\left(\frac{k}{\|k\|_D}\right)\in\mathbb R.
\end{align*}
If $k=0$, then $\phi(k)=0$. Thus $\phi$ is real-valued on every self-adjoint element.
We now prove positivity. Let $x\in D$ be positive. If $x=0$, then $\phi(x)=0$. Suppose $x\ne 0$, and define the normalized positive element
\begin{align*}
h:=\frac{x}{\|x\|_D}.
\end{align*}
Then $h$ is positive and $\|h\|_D=1$. The standard C*-order norm fact for positive contractions says that $0\le h\le 1_D$, hence $1_D-h$ is positive and
\begin{align*}
\|1_D-h\|_D\le 1.
\end{align*}
Since $1_D-h$ is self-adjoint, the reality result already proved implies
\begin{align*}
\phi(1_D-h)\in\mathbb R.
\end{align*}
The norm estimate for $\phi$ gives
\begin{align*}
|\phi(1_D-h)|\le \|\phi\|_{D^*}\|1_D-h\|_D\le 1.
\end{align*}
Using $\phi(1_D)=1$, we rewrite the scalar on the left as
\begin{align*}
\phi(1_D-h)=1-\phi(h).
\end{align*}
Because this scalar is real and has absolute value at most $1$,
\begin{align*}
-1\le 1-\phi(h)\le 1.
\end{align*}
The left inequality gives $\phi(h)\ge 0$. Finally, $x=\|x\|_D h$ and $\|x\|_D>0$, so
\begin{align*}
\phi(x)=\|x\|_D\phi(h)\ge 0.
\end{align*}
Thus $\phi$ is positive on every positive element of $D$.
[/guided]
[/proof]
[/step]
[step:Apply the positivity criterion to the Hahn-Banach extension]
Apply the claim with $D=A$ and $\phi=\widetilde{\rho}$. The previous step verifies the two hypotheses:
\begin{align*}
\|\widetilde{\rho}\|_{A^*}=1
\end{align*}
and
\begin{align*}
\widetilde{\rho}(1_A)=1.
\end{align*}
Hence $\widetilde{\rho}(a)\ge 0$ for every positive element $a\in A$. Therefore $\widetilde{\rho}:A\to\mathbb C$ is a positive linear functional with $\widetilde{\rho}(1_A)=1$, so it is a state on $A$. Since $\widetilde{\rho}|_B=\rho$ by construction, this state extends $\rho$, as required.
[/step]