Intersection of cosets from possibly distinct subgroups is either empty or a coset of the intersection between the two subgroups

$a$ and $b$ need not to be equal. You have to show that the intersection between a left coset $aH$ of $H$ and a left coset $bK$ of $K$ is a left coset of $H \cap K$, that is $aH \cap bK = c(H \cap K)$ for some $c \in G$.

As you hinted, suppose $aH \cap bK \neq \emptyset$ and let $x \in aH \cap bK$. Then $x = ah = bk$ for some $h \in H$, $k \in K$ and $h = xa^{-1}$, $k = xb^{-1}$.

We shall now prove that $aH = xH$. Let $g \in aH$, then $$g = ah' = xh^{-1}h' \in xH$$

for some $h' \in H$.

Conversely, if $g \in xH$, then $$g = xh' = ahh' \in aH$$ for some $h' \in H$.

Similarly, we have $bK = xK$.

Hence (explain why!) $aH \cap bK = xH \cap xK = x(H \cap K)$.


dani_s's answer has a typo in the second paragraph. It should state $a=xh^{-1}, b=xk^{-1}$ instead ($h=xa^{-1}$ would be wrong without assuming abelian group).

Also the middle section of the proof can be shortened: $$aH=xh^{-1}H=x(h^{-1}H)=xH \quad\text{ since }h^{-1} \in H$$ and $$bK=xk^{-1}K=x(k^{-1}K)=xK \quad\text{ since }k^{-1} \in K.$$