Hint $\rm\ mod\ m = 1\!+\!7k\!:\,\ 1\equiv -7\,\color{#C00}k\ \Rightarrow\ \dfrac{1}7\,\equiv\, \dfrac{-7k}{\ 7}\, \equiv\, -\color{#C00}k$
Therefore $\rm\ m = 6000 = 1+ 7\cdot \color{#C00}{857}\ \Rightarrow\: \dfrac{1}{7}\,\equiv\, -\color{#C00}{857}\equiv 5143\pmod{6000}$
Generally one can employ the Extended Euclidean Algorithm to compute modular inverses. The above is an optimization for the frequent special case where the modulus is $\equiv \pm1\:$ modulo the number being inverted ($= 7$ above), so the algorithm terminates in a single step.