Complex sentence: When both H_A and H_B have finite dimensions, there is no difference between trace-class and Hilbert-Schmidt operators, so in that case "A" can be given by Riesz representation theorem.
Split into simpler sentences: When both H_A and H_B have finite dimensions, there is no difference between trace-class and Hilbert-Schmidt operators. So in that case "A" can be given by Riesz representation theorem.