If \(a ≡ b mod m\), then there is an integer \(k\) such that:
$$ mk = b - a $$
We can divide both sides with integer \(d\):
$$ \begin{gathered} (mk)/d = (b - a)/d = (b/d) - (a/d) \\ \implies \frac{a}{d} ≡ \frac{b}{d} \bmod \frac{m}{d} \end{gathered}$$