[proofplan]
We define the candidate extension by the only possible formula: send the adjoined unit of $A^+$ to the unit of $B$ and agree with $\pi$ on $A$. The main verification is algebraic: using the unitization multiplication and involution formulas, the candidate preserves products, adjoints, scalar combinations, and the unit. Uniqueness follows from the decomposition $(a,\lambda)=(a,0)+\lambda(0,1)$, and the injectivity criterion follows by solving the equation $\pi(a)+\lambda 1_B=0$.
[/proofplan]
[step:Define the only possible unital extension]
Define a map $\pi^+:A^+\to B$ by
\begin{align*}
\pi^+(a,\lambda)=\pi(a)+\lambda 1_B
\end{align*}
for every $a\in A$ and every $\lambda\in\mathbb C$.
This map extends $\pi$ because, for every $a\in A$,
\begin{align*}
\pi^+(a,0)=\pi(a).
\end{align*}
It is unital because the unit of $A^+$ is $(0,1)$, and hence
\begin{align*}
\pi^+(0,1)=1_B.
\end{align*}
[/step]
[step:Verify that the extension is a unital $*$-homomorphism]
Let $(a,\lambda),(b,\mu)\in A^+$ and let $\alpha,\beta\in\mathbb C$. Since $\pi:A\to B$ is linear, we have
\begin{align*}
\pi^+(\alpha(a,\lambda)+\beta(b,\mu))=\alpha\pi^+(a,\lambda)+\beta\pi^+(b,\mu).
\end{align*}
Using the unitization product and the multiplicativity and linearity of $\pi$, we compute
\begin{align*}
\pi^+((a,\lambda)(b,\mu))=\pi(ab+\lambda b+\mu a)+\lambda\mu 1_B.
\end{align*}
Therefore
\begin{align*}
\pi^+((a,\lambda)(b,\mu))=\pi(a)\pi(b)+\lambda\pi(b)+\mu\pi(a)+\lambda\mu 1_B.
\end{align*}
Since $1_B$ is the multiplicative identity in $B$, the right-hand side is
\begin{align*}
(\pi(a)+\lambda 1_B)(\pi(b)+\mu 1_B)=\pi^+(a,\lambda)\pi^+(b,\mu).
\end{align*}
Thus $\pi^+$ preserves multiplication.
Using the unitization involution and the fact that $\pi$ preserves adjoints, we also have
\begin{align*}
\pi^+((a,\lambda)^*)=\pi(a^*)+\overline{\lambda}1_B.
\end{align*}
Hence
\begin{align*}
\pi^+((a,\lambda)^*)=\pi(a)^*+\overline{\lambda}1_B=(\pi(a)+\lambda 1_B)^*=\pi^+(a,\lambda)^*.
\end{align*}
Together with $\pi^+(0,1)=1_B$, this proves that $\pi^+:A^+\to B$ is a unital $*$-homomorphism.
[guided]
The only point that needs checking is that the formula respects the algebra structure of the unitization. Let $(a,\lambda),(b,\mu)\in A^+$ and let $\alpha,\beta\in\mathbb C$. The [vector space](/page/Vector%20Space) structure on $A^+=A\oplus\mathbb C$ is componentwise, so
\begin{align*}
\alpha(a,\lambda)+\beta(b,\mu)=(\alpha a+\beta b,\alpha\lambda+\beta\mu).
\end{align*}
Using linearity of $\pi:A\to B$, we obtain
\begin{align*}
\pi^+(\alpha(a,\lambda)+\beta(b,\mu))=\pi(\alpha a+\beta b)+(\alpha\lambda+\beta\mu)1_B.
\end{align*}
This equals
\begin{align*}
\alpha(\pi(a)+\lambda1_B)+\beta(\pi(b)+\mu1_B)=\alpha\pi^+(a,\lambda)+\beta\pi^+(b,\mu).
\end{align*}
Thus $\pi^+$ is linear.
Now we check multiplication. The product in the standard unitization is
\begin{align*}
(a,\lambda)(b,\mu)=(ab+\lambda b+\mu a,\lambda\mu).
\end{align*}
Applying $\pi^+$ gives
\begin{align*}
\pi^+((a,\lambda)(b,\mu))=\pi(ab+\lambda b+\mu a)+\lambda\mu1_B.
\end{align*}
Because $\pi$ is a $*$-homomorphism, it is linear and multiplicative. Therefore this becomes
\begin{align*}
\pi(a)\pi(b)+\lambda\pi(b)+\mu\pi(a)+\lambda\mu1_B.
\end{align*}
On the other hand, multiplying the two proposed images in the unital algebra $B$ gives
\begin{align*}
\pi^+(a,\lambda)\pi^+(b,\mu)=(\pi(a)+\lambda1_B)(\pi(b)+\mu1_B).
\end{align*}
Expanding in $B$ and using that $1_B$ is the identity gives the same expression:
\begin{align*}
\pi^+(a,\lambda)\pi^+(b,\mu)=\pi(a)\pi(b)+\lambda\pi(b)+\mu\pi(a)+\lambda\mu1_B.
\end{align*}
Hence $\pi^+$ preserves multiplication.
Finally, the involution in $A^+$ is
\begin{align*}
(a,\lambda)^*=(a^*,\overline{\lambda}).
\end{align*}
Since $\pi$ preserves adjoints,
\begin{align*}
\pi^+((a,\lambda)^*)=\pi(a^*)+\overline{\lambda}1_B=\pi(a)^*+\overline{\lambda}1_B.
\end{align*}
Because $1_B^*=1_B$, this equals
\begin{align*}
(\pi(a)+\lambda1_B)^*=\pi^+(a,\lambda)^*.
\end{align*}
Together with $\pi^+(0,1)=1_B$, this proves that $\pi^+$ is a unital $*$-homomorphism.
[/guided]
[/step]
[step:Prove uniqueness from the decomposition in the unitization]
Let $\rho:A^+\to B$ be a unital $*$-homomorphism such that $\rho(a,0)=\pi(a)$ for every $a\in A$. For every $(a,\lambda)\in A^+$, the vector space decomposition in $A^+=A\oplus\mathbb C$ gives
\begin{align*}
(a,\lambda)=(a,0)+\lambda(0,1).
\end{align*}
Using linearity of $\rho$ and unitality of $\rho$, we obtain
\begin{align*}
\rho(a,\lambda)=\rho(a,0)+\lambda\rho(0,1)=\pi(a)+\lambda1_B.
\end{align*}
Thus $\rho=\pi^+$, so the unital extension is unique.
[/step]
[step:Characterize when the extension is injective]
Assume that $\pi$ is injective.
First suppose that $\pi(A)$ contains no nonzero scalar multiple of $1_B$. Let $(a,\lambda)\in A^+$ satisfy $\pi^+(a,\lambda)=0$. Then
\begin{align*}
\pi(a)+\lambda1_B=0.
\end{align*}
If $\lambda=0$, then $\pi(a)=0$, and injectivity of $\pi$ gives $a=0$. Hence $(a,\lambda)=(0,0)$.
If $\lambda\ne 0$, then
\begin{align*}
\pi(a)=-\lambda1_B.
\end{align*}
This says that $\pi(A)$ contains the nonzero scalar multiple $-\lambda1_B$ of $1_B$, contradicting the hypothesis. Therefore the case $\lambda\ne 0$ cannot occur, and $\ker\pi^+=\{(0,0)\}$. Hence $\pi^+$ is injective.
Conversely, suppose that $\pi(A)$ contains a nonzero scalar multiple of $1_B$. Then there exist $a\in A$ and $\lambda\in\mathbb C\setminus\{0\}$ such that
\begin{align*}
\pi(a)=\lambda1_B.
\end{align*}
For the element $(a,-\lambda)\in A^+$, we have
\begin{align*}
\pi^+(a,-\lambda)=\pi(a)-\lambda1_B=0.
\end{align*}
Also $(a,-\lambda)\ne(0,0)$ because its scalar component is $-\lambda\ne 0$. Thus $\pi^+$ has a nonzero kernel element and is not injective.
Combining both directions, $\pi^+$ is injective if and only if $\pi(A)$ contains no nonzero scalar multiple of $1_B$.
[/step]