Adding the last column (units place) , 5 + 8 + 7 = 20, writing 0 and carrying 2 to the next column,
Now, 3 + 9 + 8 + 2(carry) = 22, writing 2 and carrying 2 to the next column.
Last digit of [2(carry) + 3 + 9 + 8] = A
So, A = last digit of 22 = 2.
We can verify:
8 2 5 3 5 4 5 6 9 8+2 5 6 9 8 7 3 8 5 2 2 0