Relation of modulo multiplicative inverses: if $m = x^{-1} \pmod y$, is there $n$ such that $n = y^{-1} \pmod x$?

You have integers $x$ and $y$, and you’re told that there is an integer $m$ such that $mx\equiv 1\pmod y$. The question is whether this implies that there is some integer $n$ such that $ny\equiv 1\pmod x$. If there always is, you’re supposed to prove this; if there are integers $x,y$, and $m$ such that $mx\equiv 1\pmod y$, but no integer $n$ satisfies the congruence $ny\equiv 1\pmod x$, you’re supposed to produce such an example.

HINT: $mx\equiv 1\pmod y$ means that there is an integer $k$ such that $mx-1=ky$, and $ny\equiv 1\pmod x$ means that there is an integer $\ell$ such that $ny-1=\ell x$.


It's saying that $m x = 1 + k y$ for some integer $k$, and it's asking whether there is an integer $n$ so that $ny = 1 + j x$ for some integer $j$.