Solution
= Solution
Under the null the common-mean estimate is $(m\bar X+n\bar Y)/(m+n)$. Completing squares gives
$$
-2\log\Lambda=\frac{mn}{m+n}(\bar X-\bar Y)^2=Z^2,
$$
where
$$
Z=\sqrt{\frac{mn}{m+n}}(\bar X-\bar Y)\sim N(0,1)
$$
under the null. The test rejects when
$$
|Z|>\Phi^{-1}(1-\alpha/2).
$$