I'm trying to understand this proof https://math.stackexchange.com/a/128549/205193 which does not seem complicated but I don't understand why :
why $p(x)=p(y)$, implies that $x$ and $y$ are in the same left coset of $H$ and the same left coset of $K$.
for exemple, if $h(x)=2$, $k(x)=3$ and $h(y)=3, k(y)=2$ dont we have $p(x)=p(y)$ even if they arent in the same cosets?
and why do we have that:
If $x$ and $y$ are in different left cosets of $H∩K$, then $p(x)≠p(y)$