A slight variation on that: we want to solve 5x= 14 (mod 26). That is, 5x= 14+ 26y for some integer y. That is the same as the Diophantine equation 5x- 26y= 14. 5 divides into 26 5 times with remainder 1. That is, 26= 5(5)+ 1 so 5(-5)- 26(-1)= 1. Multiply that by 14: 5(-70)- 26(-14)= 14. That tells us that x= -70 is a solution. Since we want a number between 0 and 25 that is equivalent to -70, add 3(26)= 78: x= 78- 70= 8 (mod 26).