If $G,H$ are finite groups, then $G\times G\cong H \times H$ implies $G \cong H$ 
Proposition. Let $G,H$ be finite groups (abelian or not). Then the following implication holds: $$G\times G\cong H\times H \Rightarrow G\cong H.$$

In the case of $G,H$ both abelian, one can use the structure theorem (by looking at the invariant factors). Otherwise, I found an argument here, which is a bit unclear to me. I will rephrase it in this post:

Lemma. For a finite group $G$, the map ${\rm FinGr}\rightarrow \mathbb{N}, A\rightarrow |\text{Hom}(A, G)|$ (i.e. $A$ goes to the number of group homomorphisms from $A$ to $G$) uniquely determines $G$, up to isomorphism. Or equivalently, if $G_1$ and $G_2$ are two finite groups, such that for any finite group $A$ we have: $|\text{Hom}(A, G_1)|=|\text{Hom}(A, G_2)|$, then $G_1\cong G_2$.

Proof proposition: From $G\times G\cong H\times H$ we get $|\text{Hom}(A, G\times G)|=|\text{Hom}(A, H\times H)|$, for any finite group $A$. From the universal property of the direct product, we have: $|\text{Hom}(L, K\times K)|=|\text{Hom}(L, K)|^2$, for any groups $L,K$. We conclude that: $|\text{Hom}(A, G)|=|\text{Hom}(A, H)|$ for any finite group $A$. Using the previous lemma, we get the desired conclusion.

My question is: how do we prove this lemma? I tried some particular cases of $A$, cyclic, simple, but it doesn't bring much into light. (EDIT: My fault, I overlooked an answer to the lemma here, which is not trivial and I still have hard time understanding it).
Anyway, if you have a more ellegant/elementary approach to the original proposition, you are more than welcome to share it. Thank you in advance!
 A: $\newcommand{\Hom}{\text{Hom}}\newcommand{\Surj}{\text{Surj}}$I disagree with Arturo's comment: Proving this lemma is much easier than proving the Krull-Schmidt theorem! Most of the work is already in the linked question but, since you have trouble understanding the answers to the linked question, and since they are to a slightly different question ($|\Hom(H, G_1)| = |\Hom(H, G_2)|$ instead of $|\Hom(G_1, H)| = |\Hom(G_2, H)|$), I'll say some more.
For any two groups $G$ and $H$, let $\Surj(G,H)$ be the set of surjective group homomorphisms $G \to H$.
Now, suppose that $G_1$ and $G_2$ are finite groups such that $|\Hom(G_1, H)| = |\Hom(G_2, H)|$ for all $H$. I claim that we also have $|\Surj(G_1, H)| = |\Surj(G_2, H)|$.
Proof of claim: By induction on $|H|$; the base case of the trivial group is obvious. Since every homomorphism $G_i \to H$ has as image some unique subgroup $H'$ of $G$, we have
$$|\Hom(G_i, H)| = \sum_{H' \subseteq H} |\Surj(G_i, H')|.$$
So, if $|\Surj(G_1, H')| = |\Surj(G_2, H')|$ for all $|H'| < |H|$, and $|\Hom(G_1, H)| = |\Hom(G_2, H)|$, we deduce that $|\Surj(G_1, H)| = |\Surj(G_2, H)|$. $\square$
In particular, $|\Surj(G_1, G_1)| \geq 1$, so we deduce that there is a surjection $G_1 \to G_2$. Similarly, there is a surjection $G_2 \to G_1$. So, since $G_1$ and $G_2$ are finite, this means that we must have $G_1 \cong G_2$. $\square$
