Let us express the state $\rho^{XB}$ in terms of eigen decomposition of $\rho_i$: $\rho^{XB}{=}\sum_{i,\lambda^{(i)}}p_i\lambda^{(i)}|i\rangle\langle i|{\otimes}|\lambda^{(i)}\rangle\langle\lambda^{(i)}|$, where $\{\lambda^{(i)}\}$ and $\{|\lambda^{(i)}\rangle\}$ are eigen values and eigen vectors of $\rho_i$ respectively. Now the following equations hold:
$$
\begin{align}
\log _2(\rho^{XB})&{=}\sum_{i,\lambda^{(i)}}\log _2(p_i\lambda^{(i)})|i\rangle\langle i|^X{\otimes}|\lambda^{(i)}\rangle\langle\lambda^{(i)}|^B \\
&{=}\sum_{i,\lambda^{(i)}}[\log _2(p_i) + \log_2(\lambda^{(i)})]. |i\rangle\langle i|^X{\otimes}|\lambda^{(i)}\rangle\langle\lambda^{(i)}|^B\\
&=\sum_{i}\log _2(p_i) |i\rangle\langle i|^X {\otimes} \mathbb{I}^B + \sum_{i} |i\rangle\langle i|^X{\otimes} \log_2(\rho_i)^B.
\end{align}
$$
Now let us calculate $S(\rho^{XB}){=}-Tr[\rho^{XB}. \log _2(\rho^{XB})]$:
$$
\begin{align}
S(\rho^{XB})&{=}-Tr\big[\rho^{XB}. \log _2(\rho^{XB})\big] \\
&{=}-Tr \bigg[\bigg(\sum_i p_i |i\rangle \langle i|^X {\otimes} \rho_i^B\bigg). \bigg( \sum_{j}\log _2(p_j) |j\rangle\langle j|^X {\otimes} \mathbb{I}^B + \sum_{j} |j\rangle\langle j|^X{\otimes} \log_2(\rho_j)^B\bigg)\bigg]\\
&=-\sum_i p_i \log_2(p_i) -\sum_i p_i Tr\big[\rho_i \log_2(\rho_i)\big] \\
&= H(\vec{p}) + \sum_i p_i S(\rho_i).
\end{align}
$$
Here,$H(\vec{p})$ is the Shannon entropy for the probabilities $\{p_i\}$. Now $I(X:B)=S(X)+S(B)-S(XB)$. We can see $S(X)=S\big(\sum_i p_i |i\rangle \langle i|\big){=}H(\vec{p})$, $S(B){=}S\big(\sum_i p_i \rho_i\big)$. Hence, putting all the quantities together we have
$$
\begin{align}
I(X:B)&=S(X)+S(B)-S(XB) \\
&= H(\vec{p}) + S\bigg(\sum_i p_i \rho_i\bigg) - H(\vec{p}) - \sum_i p_i S(\rho_i) \\
&=S\bigg(\sum_i p_i \rho_i\bigg) - \sum_i p_i S(\rho_i).
\end{align}
$$