Let $\mathbb Z_5 = \mathbb Z/5\mathbb Z$.
The value of $x$ which satisfies the equation $3x = 4\bmod 5$ is...?
The answer is $3$. I understand why the answer is $3$, but not how it was derived. Is there an equation or process I can use that will give me the correct answer no matter how large the numbers in the equation?
You need to find the inverse of $3$ modulo $5$. By Bézout’s identity, there are integers $x$ and $y$ such that $3x+5y=1$, which you can find with the (reverse) Euclidean algorithm: \begin{align} \color{red}{5}&=\color{red}{3}\cdot1+\color{red}{2}\\ \color{red}{3}&=\color{red}{2}\cdot1+\color{red}{1}\\ \color{red}{2}&=\color{red}{1}\cdot2+0 \end{align} The reverse algorithm gives \begin{align} \color{red}{1}&=\color{red}{3}+\color{red}{2}\cdot(-1)\\ &=\color{red}{3}+(\color{red}{5}+\color{red}{3}\cdot(-1))\cdot(-1)\\ &=\color{red}{3}\cdot(1+1)+\color{red}{5}\cdot(-1)\\ &=\color{red}{3}\cdot2+\color{red}{5}\cdot(-1) \end{align} which shows we can choose $x=2$ and $y=-1$. Since $3\cdot2+5\cdot(-1)=1$, we have $$ 2\cdot3\equiv 1\pmod{5} $$ and so $$ 2\cdot3x\equiv2\cdot4\pmod{5} $$ which gives $$ x\equiv3\pmod{5} $$ Of course, for congruences modulo $5$ it's much easier to do trial and error, that is, trying $3\cdot m$ for $m=1,2,3,4$ and stop when the hit is found.
On the other hand, the above method will work for every problem of the form $$ ax\equiv b\pmod{n} $$ where $\gcd(a,n)=1$.