$15x \equiv 31 \pmod{47}$
\begin{align*} 47 & = 15 \cdot 3 + 1\\ 15 & = 2 \cdot 7 + 1\\ 1 & = 15 - 7 \cdot 2\\ 1 & = 15 - 7 \cdot [47 + (-3) \cdot 15]\\ 1 & = (-7)(47) + (22)(15) \end{align*} Now the inverse of $15 \equiv 31 \pmod{47}$ is $22$. $x$ is simply $22 \cdot 31$ which is $682$. $x = 682$. Am I correct?