If the connected sum $A\#B$ is homeomorphic to $S^2$ then $A\cong B \cong S^2$ I was looking for this, but I can't find anything. 
Problem. Let $A, B$ two compact surfaces such that $A\#B \cong S^2$ then $A\cong B \cong S^2$.
I considerd infinite connected sum $A\#B\#A\dotsc$ and $B\#A\#B\dotsc$ These are homeomorphic to $\mathbb{R}^2$ and with $\{\infty\}$ to $S^2$, but I cant finalize the prove.
Can you get me a hint? Thank 
Edit. Can I prove it using this? Connected sum of non orientable surfaces is non orienable, then A and B are orientables, in fact, are respectively connected sum of n and m torus. Hence we also know that connected sum of A and B is homeomorphic to the connected sum of $n+m$ torus. Therefore $m+n=0$ and $m,n\geq 0$ so $m=n=0$.

As you have mentioned, $A\#(B\#A\#B\#\cdots)\simeq \mathbb{R}^2$ and $B\#A\#B\#\cdots\simeq \mathbb{R}^2$. 
But observe that if $X$ is a compact surface, $X\#\mathbb{R}^2 \simeq X\setminus\{x_0\}$ (=$X$ minus a point) Therefore, it means that $A$ minus a point is homeomorphic to $\mathbb{R}^2$, and then it is easy to conclude that $A \simeq S^2$. That $B\simeq S^2$ follows easily by symmetry. 
