I saw this expression in a book and I cannot understand how did he get this expression. Suppose $Z_t$ and $D_t$ are some stochastic processes and we have these expressions, $Z_{t_k} - Z_{t_{k-1}} = (t_k - t_{k-1})(D_1 + ... + D_{n-k+1}) - t_{k-1}D_{n-k+2}$
$Z_{t_i} - Z_{t_{i-1}} = (t_i - t_{i-1})(D_1 + ... + D_{n-i+1}) - t_{i-1}D_{n-i+2}$
How did they get this covariance equation?
$Cov(Z_{t_k} - Z_{t_{k-1}}, Z_{t_i} - Z_{t_{i-1}}) = (t_k - t_{k-1})(t_i - t_{i-1}) \sum_{m=1}^{n-i+1} Var(D_m) - t_{i-1}((t_k - t_{k-1})Var(D_{n-i+2})$
Any hint appreciated as I cannot figure out which formula they are using here.