Solution:
For a given card, let p(n) denote the probability that it is in its original position after n swaps. Then
p(n+1)=p(n)⋅53+(1−p(n))⋅101,
by casework on whether the card is in the correct position or not after n swaps. In particular, p(0)=1, p(1)=3/5, p(2)=2/5, and p(3)=3/10.
For a certain digit originally occupied with the card labeled d, we see that, at the end of the process, the card at the digit is d with probability 3/10 and equally likely to be one of the four non-d cards with probability 7/10. Thus the expected value of the card at this digit is
103d+107⋅425−d=4012d+175−7d=8d+35
By linearity of expectation, our final answer is therefore
813579+35⋅11111=8402464=50308