So I've attempted calculating the modular inverse of $3$ modulo $68238256$, but my answer is wrong. I know the answer should be $45492171$, but I keep getting $22746085$. I can see that $68238256 - 22746085 = 45492171$, but I don't know how to get there.
Here is my incorrect attempt:
$d \times 3^{-1} \equiv \pmod{68238256 }$
Using Euclid's algorithm:
$68238256=3 \times 22746085+1$
$3=1 \times 3+0$
Substitute:
$1=68238256-3 \times 22746085$
Therefore, $d=22746085$
It should be $d\equiv\color{red}-22746085\equiv45492171\bmod68238256$