Let $\{|a\rangle\}_{a=1}^n$ and $\{|b\rangle\}_{b=1}^n$ be the basis states of the individual system (in this case they have the same dimension). You can build a basis for the composite system using the tensor product
$$\{|ab\rangle\}_{a,b=1}^n\qquad |ab\rangle:=|a\rangle\otimes|b\rangle \quad\forall a,b=1,2...n\tag{1}$$
Your states con be now labeled by $ab$; summing over $ab$ means summing over all possible values of $a$ and $b$ i.e.
$$\sum_{ab}=:\sum_a\sum_b=\sum_{a,b}\tag{2}$$
I'll clarify the notation further:
- The first sum $\sum\limits_{ab}$ is a sum over all basis states $|ab\rangle$;
- By construction of the basis states (see $(1)$), this means summing over all possible values of $a$ and $b$, that is $\sum\limits_a\sum\limits_b$;
- Finally, the last sum is just a shorthand notation for the previous one. The comma means we're summing separately over $a$ and over $b$.
Any state of the composite system can be expressed as a linear combination of the basis elements
$$|\Psi\rangle=\sum_{ab}\psi(a,b)|ab\rangle$$
So, given a generic operator $\hat{L}$, the average value is given by
$$\langle\hat{L}\rangle:=\langle\Psi|\hat{L}|\Psi\rangle=^1\sum_{ab}\sum_{a'b'}\psi(a,b)\underbrace{\langle ab|\hat{L}|a'b'\rangle}_{L_{ab,a'b'}}\psi(a',b')=^2\sum_{ab,a'b'}\psi(a,b)L_{ab,a'b'}\psi(a',b')\tag{3}$$.
Ok, now your question can be answered. If the observable is only associated with $A$, its action on the $b$ part is trivial. More formally, such an operator will be of the form
$$\hat{L}=\hat{L}_a\otimes\hat{I}_b$$
Where $\hat{L}_a$ is an operator acting on the $a$-space and $\hat{I}_b$ is the identity operator on the $b$-space. In such case:
$$L_{ab,a'b'}=\langle ab|\hat{L}|a'b'\rangle=\langle a|\hat{L}_a|a'\rangle\langle b|b'\rangle=L_{aa'}\delta_{bb'}$$
Using this in $(3)$, the sum over $b'$ collapses due to Kronecker delta
$$\sum_{ab,a'b'}\psi(a,b)L_{ab,a'b'}\psi(a',b')=\sum_{a}\sum_{a'}\sum_{b}\sum_{b'}\psi(a,b)L_{aa'}\delta_{bb'}\psi(a',b')=\\ \sum_{a}\sum_{a'}\sum_{b}\psi(a,b)L_{aa'}\psi(a',b)=\sum_{a,a',b}\psi(a,b)L_{aa'}\psi(a',b)$$
And we're done. Hope this makes things clearer.
$^1$ The author separates the row index and the column index using a comma. Do not confuse this with the shorthand notation for sum discussed above.
$^2$ See what I did here? I used the shorthand notation for the double sum, separating indexes with a comma. Each sum is a sum over $ab$, so each of them is really a double sum.