Solution (source code)

= Solution

For each $z$, integrate the probability of occupying the ill state:
$$
\mathbb E_H^{(z)}\!\left[\text{total future time in }I\right]
=\int_0^\infty P_{HI}^{(z)}(t)\,dt.
$$
Equivalently, this is the $(H,I)$ entry of the <fundamental matrix of an absorbing continuous-time Markov chain> $(-Q_{z,T})^{-1}$.

There is also a direct calculation. Each episode is fatal with probability $\delta/(\gamma+\delta)$, so the expected number of episodes before death is $(\gamma+\delta)/\delta$. Each lasts on average $1/(\gamma+\delta)$, giving
$$
\mathbb E_H^{(z)}[\text{total ill time}]=\frac1\delta=100\text{ days}.
$$
The acquisition rates change the waiting time between episodes but, under this model, not the total time eventually spent ill. Thus both risk groups have the same estimate.