Given Steps
$\Large=\operatorname{Cov}(Y,B)\\\Large=\sum_{i=1}^n \sum_{j=1}^n \operatorname{Cov}(Y_i,B_j) \\\Large= \sum_{i=1}^n\sum_{j=1, j\neq i}^n\operatorname{Cov}(Y_i,B_j)+ \sum_{i=1}^n \operatorname{Cov}(Y_i,B_i)\\\Large= \sum_{i=1}^n\sum_{j=1, j\neq i}^n0+ \sum_{i=1}^n p_yp_b\\\Large=\boxed{np_Yp_B}$
I can't wrap my head around this calculation where they split the summation $$\color{red}{\sum_{i=1}^n \sum_{j=1}^n \operatorname{Cov}(Y_i,B_j) = \sum_{i=1}^n\sum_{j=1, j\neq i}^n\operatorname{Cov}(Y_i,B_j)+ \sum_{i=1}^n \operatorname{Cov}(Y_i,B_i)}$$
Can someone explain how this works?
Update : Nevermind, I think I worked it out. It's because the summation after the $+$ sign is summing over the $i^{th}$ terms of $Y$ and $B$ which was excluded from the summation the first summation after the $=$ sign, due to $j \neq i$
$$\sum_{i=1}^n \sum_{j=1}^n Cov(Yi,Bj) = \sum_{i=1}^n (\sum_{j=1, j!=i}^n Cov(Yi,Bj) + \sum_{j=i}^nCov(Yi,Bj)\space)$$ $$= \sum_{i=1}^n\sum_{j=1, j!=i}^n Cov(Yi,Bj) + \sum_{i=1}^n\sum_{j=i}^n Cov(Yi,Bj)$$ Second sum in the second term is only defined once at $\space j=i$. Therefore, we can substitute $i$ for $j$ and eliminate the second summation. $$ = \sum_{i=1}^n\sum_{j=1, j!=i}^n Cov(Yi,Bj)+ \sum_{i=1}^n Cov(Yi,Bi)$$