I have the following linear congruence:
$$5037x \equiv 8 (mod 79)$$
how could I find the value of x?
If I were to use the Euclidean algorithm, wouldn't I find the multiplicative inverse of $5037 (mod 79)$? The algorithm though works for $5037x (mod 79) = 1$, is it the same for $8 (mod 79)$?
First, since we are working modulo $79$, we can reduce everything modulo $79$. $$ 5037 x \cong 8 \pmod{79} $$ becomes $$ 60 x \cong 8 \pmod{79} \text{.} $$ Now I'll describe the intention and plan of what we are doing because you seem a little muddled on these things. We wish we could divide $60$ from both sides of the congruence, but division isn't straightforward in modular arithmetic. In fact, it is more useful to talk in terms of multiplication and to say: We want a $u$ such that $u \cdot 60 \cong 1 \pmod{79}$ so that we may multiple both sides of our congruence by it to clear the coefficient on $x$, leaving $x$ alone on its side of the congruence. Notice that this $u$ is playing the role of "$1/60$" in the system of residues modulo $79$.
How do we find this $u$? We want a $u$ such that $$ u \cdot 60 \cong 1 \pmod{79} $$ which is the same thing as we want a $u$ such that $$ u \cdot 60 + k \cdot 79 = 1 $$ for some integer $k$. This should look like the results of the extended Euclidean algorithm. One thing to check immediately: Is this equation satisfiable? We check this by computing $\gcd(60, 79) = 1$ and ensuring that it divides the right-hand side, which it does. If we are smart, we kept the coefficients in the GCD computation so we could immediately write $$ -25 \cdot 60 + 19 \cdot 79 = 1 \text{.} $$ This means we also get a solution when we check that a solution exists (if we do the extra side work for the extended Euclidean algorithm). This equation says $$ -25 \cdot 60 \cong 1 \pmod{79} \text{,} $$ so $u = -25 \cong 54$ is the $u$ we need.
So $$ 54 \cdot 60 x \cong x \pmod{79} $$ and using this in the original equation, $$ x \cong 54 \cdot 60 x \cong 54 \cdot 5037 x \cong 54 \cdot 8 \cong 37 \pmod{79} \text{.} $$