I'm not sure how to do this but I gave it a try:
I know that $7$ must have an inverse because $\text{ gcd }(12,7)=1$
Now, on this, use euclidean algorithm. We have $$7x \equiv 1 \text{ mod } 12$$
$$x \equiv 7^{-1}(\text{ mod } 12)$$
So
$$12 = 7 \cdot 1+5$$
$$7=5 \cdot 1+2$$
$$5=2\cdot 2+1$$
Now we can stop this here and write:
$$1=5-4$$
And now I cannot replace $4$ because there isn't any $4$ in the equations above : /
What to do? There is another, easier way?
At the end you write $$ 1 = 5 - 2 \cdot 2 $$ and replace a $2$ with $7 - 5 \cdot 1$ using the previous equation. Don't multiply to get the $4$.
Of course in this small example you could look for a multiple of $7$ near a multiple of $12$. Since $5 \cdot 7 = 36 -1$ the inverse of $7$ will be $-5$, which is $7$. So $7$ is its own inverse. I should have seen that right away since $7^2 = 48+1$.