Solving Linear Congruences. Question is -:
Solve the linear congruence $3x  \equiv  4\left(mod\, \, \, \, 7\right)$, and find the smallest positive integer that is a solution of this congruence
My Approach-:
$3x  \equiv  4\left(mod\, \, \, \, 7\right)$
$\Rightarrow x  \equiv  3^{-1}\, \,4\left(mod\, \, \, \, 7\right)$
$3^{-1}$ means it is the multiplicative inverse of $3\, \,mod\, \,7$
multiplicative inverse of $3\, \,mod\, \,7$
$\Rightarrow 7=3*2+1$
$\Rightarrow 3=1*3+0$
$\Rightarrow 1=1*7+\left(-2\right)3$
thus $-2$  or   $5$ is the inverse.
Thus i am getting
$\Rightarrow x  \equiv  3^{-1}\, \,4\left(mod\, \, \, \, 7\right)$
$\Rightarrow x  \equiv 20\left(mod\, \, \, \, 7\right)$
But in the solution they are multiplying the inverse $5$ to both sides and get equation as-:
$15 \,x \equiv20 \, \left(mod\,\,7\right) $ 
and then
$x \equiv 15x\,\equiv\,20\,\equiv\,\,6\,\left(mod\,\,7\right)$ 
The solution is given here
Please help me out ,where i am wrong!
thanks!

writing this as a formal fraction we have $$x\equiv \frac{4}{3}\equiv \frac{11}{3}\equiv \frac{18}{3}\equiv 6\mod 7$$
