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.