Calculating a modular equation from another

If we know that the following is true for given values of $x,y,z$:

$x \equiv z \pmod y$

Then how can we then calculate the following from the previous equation:

$\frac{x}{a} \equiv ? \pmod y$

-
 For this to make sense, the integer $a$ should have a so called modular inverse. In other words, you are expected to first find an integer $a'$ such that $aa'\equiv 1\pmod y$. This is possible if and only if $a$ and $y$ are coprime. Then $a'$ assumes the role of $1/a$, so $$\frac xa\equiv x\cdot\frac1a\equiv xa'\pmod y.$$ The ring axioms then imply that the residue class of $xa'$ modulo $y$ is the only residue class $w$ with the property $wa\equiv x$. So if you find such a residue class by some other method (e.g. trial and error) you are done. – Jyrki Lahtonen Oct 30 '12 at 15:00