$\displaystyle \\\text{Given }n\text{ random variables }X_1,X_2,...,X_n\text{ each having the same variance of }\sigma^2\text{, and defining}\\\\U=2X_1+X_2+...+X_{n-1}\text{ and }V=X_2+X_3+...+2X_n\text{, find the coefficient of correlation between U and V.}$

Solution:

$\displaystyle \\\rho_{UV}=\frac{Cov[U,V]}{\sigma_U\sigma_V}\text{; }\sigma^2_U=(4+1+1+1+...+1)\sigma^2=(n+2)\sigma^2= \sigma^2_V\text{.}\\\\\text{Since the X's are independent, if }i\neq j\text{ then }Cov[X_i,X_j]=0\text{. Then, noting that }\\\\Cov[W,W]=Var[W]\text{,}\\\\\text{we have }Cov[U,V]=Cov[2X_1,X_2]+Cov[2X_1,X_3]+...+Cov[X_{n-1},2X_n]=\\\\Var[X_2]+Var[X_3]+...+Var[X_{n-1}]=(n-2)\sigma^2\text{.}\\\\\text{Then, }\rho_{UV}=\frac{(n-2)\sigma^2}{(n+2)\sigma^2}=\frac{(n-2)}{(n+2)}$

I understand the first line. The rest is confusing. I don't understand how $\displaystyle Cov[U,V]$ is found. Any help would be appreciated. Thanks

Edit: I guess it helps to take the time to type everything out and look at it. I have an understanding of the solution now, but I wouldn't be able to come up with a solution on my own. I'd love any insights for this sort of problem. Thanks