$$\sum_{r = 1}^n \sum_{p=1}^n A_{j,p}A_{p,r}A_{r,k}=\sum_{p = 1}^n \sum_{r=1}^n A_{j,p}A_{p,r}A_{r,k}$$
Would reviewing double sums help me to avoid asking questions like this?
Does anybody know of a good source I can use to learn properties of double sums like this?
The short answer is that addition is commutative. More generally, $$\sum_{i=1}^m \sum_{j=1}^n c_{i,j} = \sum_{j=1}^n \sum_{i=1}^m c_{i,j}.$$ Just think of adding up the elements of an $m \times n$ matrix either row-wise or column-wise.