Let's expand upon your notation to make the computation easier to understand.
let $T$ be the total lifetime of the system. This lifetime is the sum of two random variables, say $T = T_1 + T_2$, representing the individual random observed times to failure of the main component and the backup, respectively. However, the components have intrinsic random lifetimes of $L_1$ and $L_2$, which represent the lifetimes if the component were to operate. That is to say, $$T_1 \mid X = L_1,$$ and $$T_2 \mid X = \begin{cases}0, & X = 0 \\ L_2, & X = 1. \end{cases}$$ In this notation, $L_1$ and $L_2$ are iid with common mean $\mu$. However, $T_1$ and $T_2$ are not identically distributed.
Consequently,
$$\begin{align*}
\operatorname{E}[T]
&= \operatorname{E}[\operatorname{E}[T \mid X]] \\
&= \operatorname{E}[\operatorname{E}[T_1 + T_2 \mid X]] \\
&= \operatorname{E}[T_1 + T_2 \mid X = 0]\Pr[X = 0] + \operatorname{E}[T_1 + T_2 \mid X = 1]\Pr[X = 1] \\
&= \operatorname{E}[L_1 + 0]\Pr[X = 0] + \operatorname{E}[L_1 + L_2]\Pr[X = 1] \\
&= \operatorname{E}[L_1](1-p) + (\operatorname{E}[L_1] + \operatorname{E}[L_2])p \\
&= \mu(1-p) + (\mu + \mu)p \\
&= (1+p)\mu.
\end{align*}$$
Much of this formalism admits shortcuts if we write instead $$\operatorname{E}[T] = \operatorname{E}[\operatorname{E}[T \mid X]] = \operatorname{E}[\mu + \mu X] = \mu\operatorname{E}[1+X] = \mu(1+p).$$ Why does this work? Because the the mean lifetime of the backup is $\mu X$; i.e., $$\operatorname{E}[T_2 \mid X] = \mu X.$$