I have this elementary problem and I would like to know if my solution is correct. The origin of the problem is this exercise.
Let $B\subset A$ be an inclusion of $C^*$-algebras and suppose that $A$ is unital. I am trying to show that, if $1_A\not\in B$, then $\text{dist}(1_A,B)\geq1$.
The only thing I can think of using is that if $\|x-1_A\|<1$ for some $x\in A$, then $x$ is invertible in $A$. So if $\text{dist}(1_A,B)<1$ then $B$ contains an invertible (in $A$) element. Moreover, it is known that the inverse is given by $$y=\sum_{n=0}^\infty(x-1_A)^n$$ Let $(s_n)$ be the sequence of partial sums, so $s_n\to y$. If we show that $y\in B$, then $1_A=xy\in B$, which is a contradiction.
Now since $s_n\to y$, we have that the subsequence $(s_{2n+1})_{n=0}^\infty$ also converges to $y$. If we show that $(s_{2n+1})_{n=0}^\infty\subset B$, then $y\in B$, since $B$ is closed. We do so inductively. For $n=0$ we have that $$s_{1}=(x-1_A)^0+x-1_A=1_A+x-1_A=x\in B $$ If $s_{2n-1}\in B$ for some $n\geq1$, then $$s_{2n+1}=s_{2n-1}+(x-1_A)^{2n}+(x-1_A)^{2n+1}=s_{2n-1}+(x-1_A)^{2n}(1_A+(x-1_A))=$$ $$=s_{2n-1}+(x-1_A)^{2n}\cdot x=s_{2n-1}+\sum_{k=0}^{2n}{2n\choose k}(-1)^{2n-k}x^{k+1}\in B $$ where the binomial expansion is able to be used since $x\cdot 1_A=1_A\cdot x=x$. This yields the claim.