Let R be a ring, and let a,b∈R. Then the class of a in R/(b) is prime if and only if the class of b in R/(a) is prime.
Proof
Suppose the class of a in R/(b) is prime.
Then (R/(b))/(((a)+(b))/(b)) is an integral domain. But
(R/(b))/(((a)+(b))/(b))≅R/((a)+(b)).
And since (R/(a))/(((a)+(b))/(a)) is also isomorphic to R/((a)+(b)) we know that (R/(a))/(((a)+(b))/(a)) is an integral domain.
Thus, ((a)+(b))/(a) is a prime ideal in R/(a).
Since ((a)+(b))/(a) is the image of (b) in R/(a), it is generated by the equivalence class of b. Being a generator of a prime ideal, the class of b is prime in R/(a).