I don't understand the equality of the middle term:
from page 40 of "Wüthrich, M. V., & Merz, M. (2008). Stochastic claims reserving methods in insurance. John Wiley & Sons." I see the first equality being this covariance, but how do we conclude the second equality being this facor times the variance?
Maybe someone can help?

Basically, the second equality follows from the assumed independence of claim observations from different years.
First we plug in the definition of $\hat f=\frac{C_{0,j+1}+\dots+C_{I-j-1,j+1}}{C_{0,j}+\dots+C_{I-j-1,j}}$ which yields, by using the $\mathcal B_j$-measurability of $C_{0,j},\dots, C_{I-j-1,j}$,
\begin{align*} \operatorname{Cov}\left(\frac{C_{i,j+1}}{C_{i,j}},\hat f\vert \mathcal B_j\right)&=\frac{1}{\sum_{i=0}^{I-j-1}C_{i,j}} \operatorname{Cov}\left(\frac{C_{i,j+1}}{C_{i,j}},\sum_{k=0}^{I-j-1}C_{k,j+1}\vert \mathcal B_j\right)\\ &= \frac{1}{\sum_{i=0}^{I-j-1}C_{i,j}} \sum_{k=0}^{I-j-1} \operatorname{Cov}\left(\frac{C_{i,j+1}}{C_{i,j}},C_{k,j}\vert \mathcal B_j\right) \end{align*}
Next, insert $1=\frac{C_{i,j}}{C_{i,j}}$ and use independence (see beginning), by which all cov-terms but one are vanishing:
$$ = \frac{C_{i,j}}{\sum_{i=0}^{I-j-1}C_{i,j}}\operatorname{Cov}\left(\frac{C_{i,j+1}}{C_{i,j}}, \frac{C_{i,j+1}}{C_{i,j}}\vert \mathcal B_j\right) $$