From Lee's book, the differential Bianchi identity states that for the Riemann curvature tensor, $$R_{ijkl;m} + R_{ijlm;k} + R_{ijmk;l}=0$$ The the proof is, contract on $i, l$, and then on $j, k$ after raising an index on each pair. Then we obtain the "contracted Bianchi identity" $$2R_{ij;}^j = S_{;i}$$ where $R_{ij}$ is the Ricci tensor, $S$ is scalar curvature, and the indices after semicolon denoting the component of the covariant derivative with respect to that index.
First, how do we contract on $i, l$? Isn't it only correct to contract on the placement of the index (e.g. the first and the last index)?
I can use symmetry to make the second term $-R_{ijml;k}$, then contract on the first and fourth index. But then I don't know how to contract $i, l$ for the last term $R_{ijmk;l}$ since then I can't use symmetry of the curvature tensor.