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$.