For groups $A,B,C$, if $A\times B$ and $A\times C$ are isomorphic do we have $B$ isomorphic to $C$? The motivation for this question is in my answer to this post :
Compatibility of direct product and quotient in group theory

(1) If I take $A$, $B$ and $C$ three groups such that $A\times B$ is isomorphic to $A\times C$ then do we have $B$ is isomorphic to $C$ ?

In the post a counter example is given when $A$ is an infinitely generated group. However I cannot get a counter-example when $A$, $B$ and $C$ are assumed to be finite groups. Note that there is no reason a priori if $\phi$ is an isomorphism from $A\times B$ to $A\times C$ that $\phi(A\times\{1_B\})=A\times\{1_C\}$. 
In the case of finite groups it is true because of the Krull-Schmidt theorem : http://en.wikipedia.org/wiki/Krull%E2%80%93Schmidt_theorem.
A slightly more general question is the following :

(2) If $B$ and $C$ are two finitely generated groups, can I always find a finitely generated group $A$ such that $A\times B$ is isomorphic to $A\times C$?

If $A$ is not assumed to verify any property but to be a group we can take :
$$A=B^{\mathbb{N}}\times C^{\mathbb{N}} $$
Furthermore replacing :$ \prod_{\mathbb{N}}$ by $\bigoplus_{\mathbb{N}}$ (or more likely the restricted product for groups but I am not sure of a well known notation, it is the subgroup of the product with all but a finite number components being trivial) will give you the same result for countably infinite groups. 
$\underline{\text{Edit}}$ : To be clear about what I am asking. (1) is kown to be true for finite groups whereas (2) is known to be true when we are considering groups without restriction (even just for countably infinite groups). Let us pretend we are working on the smaller class of groups : the finitely generated groups. Is there any counter example to $(1)$? Is there any counter example to $(2)$? 
$\underline{\text{Edit 2}}$: Here is a partial answer, from the classification of finitely generated abelian groups $(1)$ is always true if all groups are assumed to be abelian finitely generated groups. Now assume that $A\times B=G=A\times C$. Then you have (derived groups) :
$$D(G)=D(A)\times D(B)=D(A)\times D(C) $$
So the abelianizations verify :
$$A^{ab}\times B^{ab}=A^{ab}\times C^{ab}$$
Because we are now in the realm of finitely generated abelian groups we get :
$$B^{ab}=C^{ab} $$
So $(2)$ cannot be true in general for instance you can take $B:=\mathbb{Z}$ and $C=\mathbb{F}_5$, those two groups have different abelianizations. 
The new question can be found here :
About a relation of non-discernability between (classes of) finitely generated groups.
 A: It is difficult to determine whether or not a group $G$ is cancellable, i.e. $H \times G \simeq K \times G$ implies $H \simeq K$ for every groups $H,K$. Hirshon proved that finite groups are cancellable. Also, Vipul Naik gave a proof I find very nice of the fact that $A \times B \simeq A \times C$ implies $B \simeq C$ for every finite groups $A,B,C$. This property holds also when $A,B,C$ are finitely generated abelian groups or divisible groups; however, in his book Infinite abelian groups, Kaplansky claims that the problem is open when $A,B,C$ are arbitrary abelian groups.
A counterexample exists when $A,B,C$ are finitely presented. Let $$\Pi = \langle a,b,c \mid [a,b]=[a,c]=1, \ b^{11}=1, \ cbc^{-1}=b^4 \rangle,$$ $$H= \langle b,c \mid b^{11}=1, \ cbc^{-1}b^4 \rangle,$$ and $$K=\langle b,y \mid b^{11} , \ yby^{-1}=b^5 \rangle.$$
It is not difficult to notice that $\Pi\simeq\mathbb{Z}\times H$. With some supplementary work, it can be proved that $\Pi \simeq \mathbb{Z} \times K$, hence $$\mathbb{Z} \times H \simeq \Pi \simeq \mathbb{Z} \times K.$$
However, $H$ and $K$ are not isomorphic. See here for more information.
Therefore, $\mathbb{Z}$ is not a cancellable group, even in the class of finitely presented groups.
In fact, Francis Oger linked several cancellation problems to model theory of groups, for example: If $G$ and $H$ are finitely generated finite-by-nilpotent groups, then $G \times \mathbb{Z} \simeq H \times \mathbb{Z}$ iff $G$ and $H$ are elementary equivalent. See here and the references therein.
