To answer your question about the second part, there isn't really a fast way to do this. There is an algorithm that will give you the answer, no guessing involved. As the other answer mentions, it's called the extended Euclidean algorithm. On Wikipedia, they give the "distilled" version, which is well-suited to running on a computer, but I seem to mess it up by hand every time I try. (Side note: A number theory course was one of the first times I wrote computer to do things that were relevant to me, and I would highly recommend doing this, if you're interested).
The idea is that you save your work from the standard Euclidean algorithm, and back-substitute like crazy. I'll show you the relevant, rewritten Euclidean algorithm, and some of the arithmetic for finding those coefficients.
\begin{align}
77 - 50 &=27 \\
50 - 27 &=23 \\
27 - 23 &= 4 \\
23 - 5 \cdot 4&= 3 \\
4 - 3 &= 1
\end{align}
It's definitely a lot of work, any way you slice it. We're going to climb up the list, so first, we'd replace the $3$ with $23-4\cdot5$, in our last equation:
$$
4 - (23 - 4\cdot 5) =1.
$$ Now, we have to replaced all instances of $4$ with $27 - 23$:
$$
27 - 23 - (23 - (27 - 23)\cdot 5) =6\cdot 27 -7 \cdot 23 = 1.
$$
We'd continue climbing up, next replacing the $23$, and so forth. Hopefully that's enough for you to get the gist of what we need to do. I can certainly provide the rest of the details, if you're interested. That's the idea behind finding those coefficients.