Let $A$ be a unital $C^*$-algebra and $x \in A$ an element with $x^* = x=x^2 = x^3$. I want to show that $\sigma_A(x) \subseteq \{0,1\}$.
Attempt:
We know that $\sigma_A(x)^2=\sigma_A(x^2) = \sigma_A(x^3) = \sigma_A(x)^3$ so I guess the statement somehow follows from $\lambda^2 = \lambda^3 \implies \lambda \in \{0,1\}$.
Let $\lambda \in \sigma_A(x)$. Then $\lambda^2 \in \sigma_A(x)^3$, so there is $\mu \in \sigma_A(x)$ with $\lambda^2 = \mu^3$. Similarly, there is $\eta$ with $\lambda^3 = \eta^2$. I feel like I'm missing something basic...
If $P$ is a polynomial then $\sigma(P(x))=P(\sigma(x)):= \{ P(\lambda)\mid \lambda\in \sigma(x)\}$.
In particular if $x=x^2$ then $x-x^2=0$ hence for every $\lambda\in \sigma(x)$ you have that $\lambda-\lambda^2=0$. The only complex numbers satisfying this equation are however $0$ and $1$ (as this is a quadratic polynomial it can have at most two solutions), so $\sigma(x)\subseteq \{0,1\}$.