I'm still puzzled by the concept of a well defined function. Let me defined a few things first. Let $G,G'$ be groups and let $\phi:G\rightarrow G'$ be a homomorphism between the two groups. As the cosets of $G$ are in one-to-one correspondence with the elements of $\phi[G]$, we can define an isomorphism $\mu:G/H \rightarrow \phi[G]$.
My question is in the following statement. We can show that
$$ (xH)(yH)=zH, $$
if $z=xy$. At this point, we may ask if the above equation is indeed well defined, or in other words, if $xH=x'H$, $x\neq x'$, $yH=y'H$, $y\neq y'$, we must have $(xy)H=(x'y')H$ (I'm taking the answer given by MJD).
Page 136,137 from Fraleigh, A first course in abstract algebra, argues that indeed $(xH)(yH)=zH$ does not depends on the representatives $x$ and $y$. To stress the point, he elaborates as
If $h_1,h_2\in H$ so that $xh_1$ is an element of $xH$ and $yh_2$ is an element of $yH$, then there exists $h_3\in H$ s.t. $h_1y=yh_3$ by Theorem 13.15. Thus we have $$ (xh_1)(yh_2)=x(h_1y)h_2=x(yh_3)h_2=(xy)(h_3h_2)\in(xy)H $$
Why this last set of equations show that the function is well defined? I would have expected a proof like in the referred answer, i.e. $(xy)H=(x'y')H$.