(a) $x+40 ≡ 1 \pmod {99}$.
(b) $40x ≡ 1 \pmod {99}$.
Is the answer for a $x \equiv -39 \pmod {99}$ and b $x\equiv\frac{1}{40}\pmod {99}$?
I believe I am doing it correctly.
(a) $x+40 ≡ 1 \pmod {99}$.
(b) $40x ≡ 1 \pmod {99}$.
Is the answer for a $x \equiv -39 \pmod {99}$ and b $x\equiv\frac{1}{40}\pmod {99}$?
I believe I am doing it correctly.
$(a)\quad x+40 ≡ 1 \pmod{99} \iff x \equiv -39 \pmod {99}\iff x \equiv -39 + 99 = 60 \pmod {99}$.
$(b) x \cdot 40 ≡ 1 \pmod {99} \iff x \equiv \frac 1{40} \pmod {99}\quad?$
Well, sort of. We do need to find the multiplicative inverse of $40$, but $\mod 99$.
As Pedro shows in the comments, we can find the multiplicative inverse of $40 \mod 99$ by using the Euclidean Algorithm, or by using the following algorithm:
$$\frac{1}{{40}} = \frac{{99 + 1}}{{40}} = \frac{{100}}{{40}} = \frac{5}{2} = \frac{{99 + 5}}{2} = \frac{{104}}{2} = 52$$
Note, we can check to ensure we've found the multiplicative inverse of $40 \mod 99$: $$40 \cdot 52 = 2080\equiv 1 \pmod{99}$$ $$\begin{align}\implies (b)\;\; x \cdot 40 \cdot 52 &\equiv 1 \cdot 52 \pmod {99} \\ \\ x & \equiv 52 \pmod{99}\end{align}$$