Use euclidean algorithm to calculate the multiplicative inverse of $5$ in $\mathbb{Z}_{12}$ I really like to know the exact way how its done. Here is what I wrote:
$5$ must have a multiplicative inverse because $\text{ gcd }(12,5)=1$
So $5x \equiv 1 \text{ mod } 12 \Leftrightarrow x \equiv 5^{-1}(\text{mod } 12)$
$$12=5 \cdot 2+2$$
$$5=2 \cdot 2+1$$
$$2=1 \cdot 2+0$$
$\Rightarrow$
$$1=5-2 \cdot 2$$
$$1=5-2 \cdot (12-5 \cdot 2)$$
$$1=5-2 \cdot 12+4 \cdot 5$$
$$1=-2 \cdot 12 + 5 \cdot 5$$
From an online calculator, I know that $5$ is its own inverse. But how do you know that from the last notation?
Please don't explain it too complicated, I have very big troubles in understanding it and I'm already very happy I was able to calculate it till here myself.

I will show you how to do it through continued fractions, that is essentially the same. We have:
$$\frac{12}{5}=2+\frac{2}{5}= 2 +\frac{1}{2+\frac{1}{2}} = [2;2,2]\tag{1}$$
and if $\frac{p_n}{q_n},\frac{p_{n+1}}{q_{n+1}}$ are two consecutive convergents of the same continued fraction, the difference between them is $\pm\frac{1}{q_n q_{n+1}}$. In our case $[2;2] = \frac{5}{2}$, and
$$ \frac{12}{5}-\frac{5}{2} = -\frac{1}{10} \tag{2} $$
leads to:
$$ 12\cdot 2 - 5\cdot 5 = -1,\quad 5\cdot 5 = 2\cdot 12+1 \tag{3} $$
hence $5$ is the inverse of itself $\!\!\pmod{12}$.
