As the title says, I want to show that when two principal ideals are equal in $R/\langle p^k\rangle,$ where $R$ is a principal ideal domain and $p\in R$ is a prime element, then their generators are associates.
So I started off by letting $\langle a+\langle p^k\rangle\rangle=\langle b+\langle p^k\rangle\rangle$ for some $a,b\in R.$ Then there exist $\langle r+\langle p^k\rangle\rangle$ and $\langle s+\langle p^k\rangle\rangle$ such that $$ar+\langle p^k\rangle=(r+\langle p^k\rangle)(a+\langle p^k\rangle)=b+\langle p^k\rangle$$ and $$bs+\langle p^k\rangle=a+\langle p^k\rangle.$$ Then $ar-b\in \langle p^k\rangle$ and $bs-a\in \langle p^k\rangle.$ But I have no idea how I should proceed from here, or if this is even the right approach.
I've also considered using the Correspondence Theorem for Rings. $\langle a+\langle p^k\rangle\rangle \lhd R/\langle p^k\rangle$ corresponds to the ideal $q^{-1}(\langle a+\langle p^k\rangle\rangle) \lhd R$ that contains $\langle p^k\rangle.$ ($q$ is the natural quotient map.) This ideal should be principal because $R$ is a PID. An ideal that contains $\langle p^k \rangle$ would be of the form $\langle p^i \rangle$ where $0\leq i \leq k.$ But again, I don't know how to proceed from here.
Any help would be much appreciated.
There is a more general version of this (if my interpretation of your question is right.)
Proof: Write $a=bx$ and $b=ay$. Then $a=ayx$, and $a(1-yx)=0$. Since $R$ is local, one of $yx$ and $1-yx$ is a unit. In the latter case, that would imply $a=0$ with the earlier equation, so that is ruled out.
Instead, $yx$ is a unit. We would like to conclude that $x$ and $y$ are units, and fortunately that's true in a local ring. If $zyx=yxz=1$, then we can see $zy$ is a left inverse to $x$. We also necessarily have $(xzy)(xzy)=x(zyx)zy=xzy$, so that $xzy$ is idempotent. There are only two idempotents in a local ring: $0$ and $1$. It is clearly not $0$, so it must be $1$, and $x$ is a unit, and $y$ is a unit.
A quotient of a PID by a power of a prime ideal is local, so this argument applies here.
$^\ast$ We say $a$ is a right associate of $b$ if there exists a unit $u$ such that $au=b$.