As I said before somewhere, the modulus operator is new to me so I struggle to work algebraically with it.

I input a number: 9876
I apply an encryption method that makes it: 6543

What I did was split that number into individual digits and applied the following: ( <number> + 7 ) % 10 = <answer>

Examples:
(6 + 7) % 10 = 3
(7 + 7) % 10 = 4

Now I am really struggling to reverse this for the decryption.

I have tried numerous ways and failed. How in the world do I input 3 to get 6 out as an answer? This must be a valid mathematical solution that I can apply in all cases. I thought decrypting it would be simple, obviously not.