Olympiad Modulo Problem I have begun preparing for the British Mathematical Olympiad and hope to do well. However, I have been working on the first problem in the book: A Mathematical Olympiad Primer by Geoff Smith, captain of the British IMO Team, and was stuck for a good few hours so looked at the back for a hint. The hint lead me nowhere so after a few days I decided to have a look at some of the solution at least and make sure I learn from it so can apply it later. However, I have been confused by the use of modular arithmetic here. It states:

$1000d + 100c + 10b + 1 = 4000 + 400b + 40c + 4d + 3$

Then it says that:

$4d \equiv 3 \pmod 5$
Hence, $d \equiv 2 \pmod 5$

I do not understand why that last part with the modular arithmetic is true. I read through the chapter on it and I thought I understood it. However, it would appear I may not have done. I have tried to look back and understand it but it has been to no avail. Explanations of the second block above would me most useful. Thanks

Modulo $5$, $4\times 4=16=1$. So $4$ is its own multiplicative inverse. So if now you multiply both sides of $4d=3\mod 5\ \ $ by $4$, you get 
$$
1\times d=4\times3=2\mod 5.
$$
