[proofplan]
We first prove the estimate when both algebras are unital, without assuming that the homomorphism preserves units. The image of the unit is a projection $p$, so the range of $\varphi$ lies in the corner $pBp$, where $\varphi$ becomes a unital $*$-homomorphism. Spectral inclusion in this corner gives the norm estimate for self-adjoint elements, and the $C^*$-identity upgrades it to all elements. The general case follows by applying the unital case to the induced homomorphism between unitizations.
[/proofplan]
[step:Pass a nonunital homomorphism between unital algebras to a corner where it is unital]
Assume first that $A$ and $B$ are unital $C^*$-algebras, with units $1_A$ and $1_B$. Define
\begin{align*}
p:=\varphi(1_A)\in B.
\end{align*}
Since $\varphi$ is multiplicative and preserves the involution,
\begin{align*}
p^2=\varphi(1_A)^2=\varphi(1_A^2)=\varphi(1_A)=p
\end{align*}
and
\begin{align*}
p^*=\varphi(1_A)^*=\varphi(1_A^*)=\varphi(1_A)=p.
\end{align*}
Thus $p$ is a projection in $B$.
Let $pBp$ denote the corner
\begin{align*}
pBp:=\{pbp:b\in B\}\subset B,
\end{align*}
equipped with the inherited norm, multiplication, and involution. This is a unital $C^*$-algebra with unit $p$. For every $a\in A$,
\begin{align*}
p\varphi(a)p=\varphi(1_A)\varphi(a)\varphi(1_A)=\varphi(1_Aa1_A)=\varphi(a),
\end{align*}
so $\varphi(A)\subset pBp$. Hence the same map, now viewed as
\begin{align*}
\varphi:A\to pBp,
\end{align*}
is a unital $*$-homomorphism, because $\varphi(1_A)=p$, the unit of $pBp$.
[/step]
[step:Prove spectral inclusion for self-adjoint elements in the corner]
Let $x\in A$ be self-adjoint. We prove
\begin{align*}
\sigma_{pBp}(\varphi(x))\subseteq \sigma_A(x),
\end{align*}
where $\sigma_A(x)$ is the spectrum of $x$ in $A$ and $\sigma_{pBp}(\varphi(x))$ is the spectrum of $\varphi(x)$ in the unital algebra $pBp$.
Let $\lambda\in \mathbb C\setminus \sigma_A(x)$. Then $\lambda 1_A-x$ is invertible in $A$. Define
\begin{align*}
y:=(\lambda 1_A-x)^{-1}\in A.
\end{align*}
Since $\varphi:A\to pBp$ is unital, multiplicative, and complex-linear,
\begin{align*}
(\lambda p-\varphi(x))\varphi(y)=\varphi(\lambda 1_A-x)\varphi(y)=\varphi((\lambda 1_A-x)y)=\varphi(1_A)=p.
\end{align*}
Similarly,
\begin{align*}
\varphi(y)(\lambda p-\varphi(x))=\varphi(y)\varphi(\lambda 1_A-x)=\varphi(y(\lambda 1_A-x))=\varphi(1_A)=p.
\end{align*}
Therefore $\lambda p-\varphi(x)$ is invertible in $pBp$, with inverse $\varphi(y)$. Hence $\lambda\notin \sigma_{pBp}(\varphi(x))$, which proves the spectral inclusion.
[guided]
The point of passing to $pBp$ is that spectra are defined relative to a unit. The element $\varphi(x)$ may not be tested against $1_B$ in the right way if $\varphi$ is not unital, but it is tested against the unit $p$ of the corner $pBp$.
Let $x\in A$ be self-adjoint. We want to show that every resolvent point of $x$ remains a resolvent point of $\varphi(x)$ in the corner. Thus take
\begin{align*}
\lambda\in \mathbb C\setminus \sigma_A(x).
\end{align*}
By the definition of the spectrum in the unital algebra $A$, the element $\lambda 1_A-x$ is invertible in $A$. Define its inverse by
\begin{align*}
y:=(\lambda 1_A-x)^{-1}\in A.
\end{align*}
Then
\begin{align*}
(\lambda 1_A-x)y=1_A
\end{align*}
and
\begin{align*}
y(\lambda 1_A-x)=1_A.
\end{align*}
Because $\varphi:A\to pBp$ is complex-linear, multiplicative, and sends $1_A$ to the unit $p$ of $pBp$, it sends the element $\lambda 1_A-x$ to
\begin{align*}
\varphi(\lambda 1_A-x)=\lambda p-\varphi(x).
\end{align*}
Applying $\varphi$ to the first inverse identity gives
\begin{align*}
(\lambda p-\varphi(x))\varphi(y)=\varphi((\lambda 1_A-x)y)=\varphi(1_A)=p.
\end{align*}
Applying $\varphi$ to the second inverse identity gives
\begin{align*}
\varphi(y)(\lambda p-\varphi(x))=\varphi(y(\lambda 1_A-x))=\varphi(1_A)=p.
\end{align*}
Thus $\varphi(y)$ is a two-sided inverse for $\lambda p-\varphi(x)$ in the unital algebra $pBp$. Therefore $\lambda\notin \sigma_{pBp}(\varphi(x))$.
Since every $\lambda\notin \sigma_A(x)$ lies outside $\sigma_{pBp}(\varphi(x))$, we have
\begin{align*}
\sigma_{pBp}(\varphi(x))\subseteq \sigma_A(x).
\end{align*}
[/guided]
[/step]
[step:Convert spectral inclusion into a norm estimate for self-adjoint elements]
Let $x\in A$ be self-adjoint. Since $\varphi$ preserves the involution,
\begin{align*}
\varphi(x)^*=\varphi(x^*)=\varphi(x),
\end{align*}
so $\varphi(x)$ is self-adjoint in $pBp$.
For a self-adjoint element $z$ in a $C^*$-algebra, the norm is equal to its spectral radius:
\begin{align*}
\|z\|=r(z):=\sup\{|\lambda|:\lambda\in\sigma(z)\}.
\end{align*}
Applying this formula in $pBp$, using the spectral inclusion from the previous step, and then applying the same formula in $A$, we obtain
\begin{align*}
\|\varphi(x)\|_{pBp}=r_{pBp}(\varphi(x))\leq r_A(x)=\|x\|_A.
\end{align*}
The norm on $pBp$ is inherited from $B$, so
\begin{align*}
\|\varphi(x)\|_B=\|\varphi(x)\|_{pBp}\leq \|x\|_A.
\end{align*}
Thus $\varphi$ is contractive on self-adjoint elements of $A$.
[/step]
[step:Apply the self-adjoint estimate to $a^*a$ and use the $C^*$-identity]
Let $a\in A$. The element $a^*a$ is self-adjoint because
\begin{align*}
(a^*a)^*=a^*a.
\end{align*}
By the self-adjoint estimate,
\begin{align*}
\|\varphi(a^*a)\|_B\leq \|a^*a\|_A.
\end{align*}
Using preservation of multiplication and involution, and then the $C^*$-identity in $B$ and $A$, we get
\begin{align*}
\|\varphi(a)\|_B^2=\|\varphi(a)^*\varphi(a)\|_B.
\end{align*}
Also,
\begin{align*}
\varphi(a)^*\varphi(a)=\varphi(a^*)\varphi(a)=\varphi(a^*a).
\end{align*}
Therefore
\begin{align*}
\|\varphi(a)\|_B^2=\|\varphi(a^*a)\|_B\leq \|a^*a\|_A=\|a\|_A^2.
\end{align*}
Taking nonnegative square roots gives
\begin{align*}
\|\varphi(a)\|_B\leq \|a\|_A.
\end{align*}
This proves the theorem when $A$ and $B$ are unital.
[/step]
[step:Reduce arbitrary $C^*$-algebras to the unital case by unitization]
Now let $A$ and $B$ be arbitrary complex $C^*$-algebras. Let $A^+$ and $B^+$ denote their standard $C^*$-unitizations, and regard $A$ and $B$ as closed two-sided ideals in $A^+$ and $B^+$ by the canonical isometric embeddings
\begin{align*}
a\mapsto (a,0)
\end{align*}
and
\begin{align*}
b\mapsto (b,0).
\end{align*}
By the universal property of unitization, [citetheorem:8573], the $*$-homomorphism $\varphi:A\to B\subset B^+$ extends to a unital $*$-homomorphism
\begin{align*}
\varphi^+:A^+\to B^+
\end{align*}
defined by
\begin{align*}
\varphi^+(a,\lambda)=(\varphi(a),\lambda)
\end{align*}
for every $a\in A$ and every $\lambda\in\mathbb C$.
Applying the unital case to $\varphi^+$ gives, for every $a\in A$,
\begin{align*}
\|\varphi^+(a,0)\|_{B^+}\leq \|(a,0)\|_{A^+}.
\end{align*}
Because the canonical embeddings of $A$ and $B$ into their unitizations are isometric,
\begin{align*}
\|\varphi(a)\|_B=\|\varphi^+(a,0)\|_{B^+}
\end{align*}
and
\begin{align*}
\|(a,0)\|_{A^+}=\|a\|_A.
\end{align*}
Hence
\begin{align*}
\|\varphi(a)\|_B\leq \|a\|_A.
\end{align*}
Since this holds for every $a\in A$, $\varphi$ is contractive. A contractive [linear map](/page/Linear%20Map) between normed spaces is continuous, so $\varphi$ is continuous.
[/step]