I feel comfortable solving equations such as using Euclid's algorithm; however, I can't seem to see how I use this to solve congruence equations in the form:

What are the steps I need to take to solve something like (making this up):

Also, how would I find an integer which is congruent to both

and

?

Also, I don't understand why there are no solutions if the modulo number is not prime (I was told that solving equations with non-prime modulo was out of the scope for my unit but I'm interested).