Let's call the length of River C "c" and the length of River D "d". We know that:
c = d + 500
And the sum of their lengths is 5,520:
c + d = 5,520
We can substitute the first equation into the second equation:
c + d = c + d + 500
So:
500 = 5,520 - c - d
Rearranging, we can find the value of d:
d = 5,520 - c - 500
d = 5,020 - c
We can now use either equation to find the value of c:
c = 5,520 - d
c = 5,520 - (5,020 - c)
Solving for c, we get:
c = 2,500
And using either equation, we can find the value of d:
d = 5,520 - c = 5,520 - 2,500 = 3,020
So River C is 2,500 miles long, and River D is 3,020 miles long.