I did:
$$gcd(84,5) = \\ 84 = 5*16+4 \\ 5=4*1+1$$
$$4 = 84-5*16 \\ 1 = 5-4*1 \\ 1 = 5-(84-5*16)\\ 1 = 17*5-1*84$$
So the answer should be $1$ but it's 4, what went wrong?
I did:
$$gcd(84,5) = \\ 84 = 5*16+4 \\ 5=4*1+1$$
$$4 = 84-5*16 \\ 1 = 5-4*1 \\ 1 = 5-(84-5*16)\\ 1 = 17*5-1*84$$
So the answer should be $1$ but it's 4, what went wrong?
$1 = 17\cdot 5-1\cdot 84 = 17\cdot 5+(-1)\cdot 84$ tells us that the answer is $-1$, which is the same as $4$, mod $5$.