We have to solve the linear congruence 42x`-=` 1(mod 5)
For an equation of the form ax`-=` b(mod n), If the greatest common divisor d of a and n divides b, the extended Euclidean algorithm gives us two integers r and s such ra + sn = d. One of the values of x then is x = rb/d.
42x`-=` 1(mod 5)
The greatest common divisor of 42 and 5 is 1. As 1 divides 1, we can write 3*42 - 25*5 = 1
=> x = 3*1/1 = 3
All other solution of the equation are of the form 3(mod 5) or 3 + k*5 where k is a positive integer.
The solution to the equation 42x `-=` 1(mod 5) is x = 3 + 5*k