Firstly, fixes a measurable set $X$, given any set $A\subseteq X$, we have a standard method to construct a measurable set $\widehat{A}$, such that $A\subseteq \widehat{A}\subseteq X$ and $\mu^*(A)=\mu(\widehat{A})$. By the definition of outer measure, for any $n\in \mathbb N$, we have a covering $\displaystyle A\subseteq \bigcup_{k=1}^\infty I_k=G_n$, such that every $I_k$ is an open interval in $\mathbb R^1$, and $\displaystyle\mu^*(A)\leqslant\mu^*(G_n)\leqslant \mu^*(A)+\frac{1}{n}$. Trivially $G_n$ is measurable, and let $\displaystyle \widehat{A}=\bigcap_{n=1}^\infty G_n\cap X$, and we will get $\displaystyle\mu(\widehat{A})\leqslant \mu(G_n)\leqslant \mu^*(A)+\frac{1}{n}$. As $A$ is subset of all $G_n$ and $X$, we can get $\mu(\widehat{A})\geqslant \mu^*(A)$, then $\mu(\widehat{A}) = \mu^*(A)$ since $n$ is arbitrary.
Now we return to the original problem. Let $X=A\cup B$, then $\mu(\widehat{A})-\mu(X-\widehat{X\backslash A}) = \mu(\widehat{A})+\mu(\widehat{X\backslash A})-\mu(X)=\mu^*(A)+\mu^*(X\backslash A)-\mu(X)\geqslant 0$ (all these sets are measurable, and the final inequality is sub-additivity). However, $\mu^*(A)+\mu^*(X\backslash A)-\mu(X)\leqslant \mu^*(A)+\mu^*(B)-\mu(X) =0$, so it can only happen that $\mu(\widehat{A})=\mu(X-\widehat{X\backslash A})$. By $\Phi=X-\widehat{X\backslash A}\subseteq A$, we can get $\mu^*(\widehat{A}-A)\leqslant \mu(\widehat{A}-\Phi)= \mu(\widehat{A})-\mu(\Phi)=0$. A set of reals with outer measure 0 is measurable, then $\widehat{A}-A$ is measurable, by $\widehat{A}$ is measurable, we have $A$ is measurable.
Finally, the result can be generalized to countably infinity unions. Let $X$ be a measurable set, and $X_1, X_2, \cdots X_n\subseteq X$, $X=\bigcup_{k=1}^\infty X_k$, $\displaystyle\sum_{k=1}^{\infty}\mu^*(X_k)=\mu(X) < \infty$. Given any $k \in \mathbb N$, we can get $\displaystyle\mu^*(X_k)+\sum_{j\neq k}\mu^*(X_j)=\mu(X)$, by sub-additivity we have $\displaystyle\mu^*\left(\bigcup_{j\neq k} X_j\right)\leqslant \sum_{j\neq k}\mu^*(X_j)$, so we get $\displaystyle\mu(X)\geqslant \mu^*(X_k)+\mu^*\left(\bigcup_{j\neq k} X_j\right)$. By sub-additivity, we can get $\displaystyle\mu(X) = \mu^*(X_k)+\mu^*\left(\bigcup_{j\neq k} X_j\right)$, then $X_k$ is measurable.