Prove that a map is defined properly 
Let $G$ a group and let $A,B$ subgroups of $G$. Let a map $f:A/A\cap B\to G/B$ by $(A\cap B)a\mapsto Ba$. Prove that $f$ is well defined (not depends on representitives).

I know that I need to prove that if $(A\cap B)a=(A\cap B)a'$ then $Ba=Ba'$. I don't understand why I can't argue that if $(A\cap B)a=(A\cap B)a'$ then $f((A\cap B)a)=f((A\cap B)a')$ and thus $Ba=Ba'$.
I have another solution that I don't understand why is true and the previous one doesn't:
Let $(A\cap B)a=(A\cap B)a'$. Then $a-a'\in A\cap B$. Thus $a-a'\in B$, thus $aB=a'B$.
 A: As pointed out in the comments, one can't argue that
$(A \cap B)a_1 = (A \cap B)a_2 \Longrightarrow Ba_1 = f((A \cap B)a_1) = f((A \cap B)a_2) = Ba_2, \tag 1$ 
since $f$ is defined in terms of whatever $b$ occurs in the exact expression $A \cap B)b$; such a definition, on the face of it and without further analysis,  yields a $b$-dependent $f$, not a coset-dependent $f$; one needs to show that if, as sets,
$(A \cap B)a_1 = (A \cap B)a_2, \tag 2$
then
$Ba_1 = Ba_2, \tag 3$
again as sets; that is, $f$ depends only on the the coset $(A \cap B)b$, not on it's particular represetative $b$.
To properly prove the desired assertion, it helps to realize that, for a
any subgroup $C$ of any group $G$, 
$Cg_1 = Cg_2, \; g_1, g_2 \in G \Longleftrightarrow g_2 g_1^{-1} \in C; \tag 4$
for if
$Cg_1 = Cg_2, \tag 5$
and $e \in G$ denotes the identity element, then since $e \in C$ (because $C$ is a subgroup of $G$), 
$\exists c \in C, \; cg_1 = eg_2 = g_2 \Longrightarrow g_2g_1^{-1} = c \in C; \tag 6$
likewise,
$g_2g_1^{-1} \in C \Longrightarrow g_2g_1^{-1} = c \in C \Longrightarrow g_2 = cg_1 \Longrightarrow Cg_2 = C(cg_1) = (Cc)g_1 = Cg_1, \tag 7$
since
$c \in C \Longrightarrow Cc = C. \tag 8$
If this notion is applied to the present problem, we may argue that
$(A \cap B)a_1 = (A \cap B)a_2 \Longrightarrow a_2a_1^{-1} \in A \cap B \Longrightarrow a_2 a_1^{-1} \in B \Longrightarrow Ba_1 = Ba_2, \tag 8$
and we see the mapping
$(A \cap B)b \mapsto Bb \tag 9$
depends only on the coset $(A \cap B)b$ and not its particular representative $b$; thus $f$ is, in fact, well-defined.
