Factor groups and well defined functions 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$.
 A: In general what is being described by the phrase "well-defined" is the following. You want to write down some function $f : X \to Y$. However, it's difficult to directly define $f$ on elements of $X$ because $X$ is given as a quotient of some other set $\widetilde{X}$ by an equivalence relation $\sim$; in group theory and many other branches of mathematics, typically this will be a quotient by a group action. 
So instead we define a function $\widetilde{f} : \widetilde{X} \to Y$, and "well-defined" means that this function respects the equivalence relation and so actually descends to a function $f : X \to Y$. This means that whenever $x_1, x_2 \in \widetilde{X}$ such that $x_1 \sim x_2$, then $\widetilde{f}(x_1) = \widetilde{f}(x_2)$; this is exactly the condition you need in order to define $f([x])$ (where $[x]$ means the equivalence class of $x$) to be $f(x)$; this needs to not depend on the choice of $x$ in its equivalence class. 
A: What Fraliegh is showing is that if you pick different representatives in the cosets $xH$ and $yH$ and you multiply them together, you still land in the coset $(xy)H$. Indeed, this is the goal when showing that an operation is well defined. 
Coset multiplication is defined by multiplication of the representatives. Namely, $(xH)(yH) = (xy)H$. But in order for this to be well defined we $\textit{must}$ have that the result is $(xy)H$ even if we choose representatives other than $x$ and $y$. More specifically, if $x'$ and $y'$ are representatives of $xH$ and $yH$ respectively, then we need $x'y' \in (xy)H$. Otherwise, the result of the coset multiplication depends on the representatives chosen.
Also, to address your last sentence, saying $x'y' \in (xy)H$ which is what is shown in the proof, is the same thing as saying $(x'y')H = (xy)H$.
