Given independent random samples $(X_1,...,X_m)$ and $(Y_1,...,Y_n)$, respectively, from the following distributions of $X$ and $Y: X\sim N(\mu_1, \sigma^2)$ and $Y \sim N(\mu_2,\sigma^2)$,consider the problem of testing the null hypothesis $H_0: \mu_1=\mu_2$ against the alternative $H_1: \mu_1 \neq \mu_2$ with unknown $\sigma^2$.
a. Formulate the underlying testing problem as that of testing one of the parameters in a multiparameter exponential family, having expressed the family explicitly in terms of all the parameters and the corresponding statistics.
b. Give the formula of the UMPU test at level α, in its conditional form, involving these statistics.
c. Describe how this test can be stated equivalently as an unconditional test. What are the ultimate test statistic and the rejection region (in terms of a known distribution?
My attempt: Suppose $H_0: \mu_1-\mu_2<0$. The joint density of $X=(X_1,...,X_m)$ and $Y=(Y_1,...,Y_n)$ can be expressed in the form of a 3-parameter exponential family as follows:
$$f_{\theta_1, \theta_2, \theta_3}(x,y)=exp(\theta_1 T_1+\theta_2 T_2+\theta_3 T_3-A(\theta_1,\theta_2, \theta_3))h(x,y)$$,
where $\theta_1=\frac{1}{\sigma^2}mn(\mu_1-\mu_2), T_1=\bar X- \bar Y, \theta_2=\frac{1}{\sigma^2} (m+n)(m \mu_1+n \mu_2), T_2=\frac{m \bar x + n \bar y}{m+n}, \theta_3=-\frac{1}{2 \sigma^2}, T_3=\sum\limits_{i=1}^m x_i^2+\sum\limits_{j=1}^{n}y_j^2$
Testing $\theta_1=\theta_{10}$ against $\theta_1 \neq \theta_{10}, \theta_{10}=0$. The UMPU test
$ \phi_0 (T_1, T_2, T_3)= \begin{cases} 1 , T_1 < c_1(T_2, T_3) \text{ or } c_2(T_2, T_3)\\ 0 , \text{otherwise} \end{cases}$
satisfying
(i) $E_{\theta_{10}} [\phi_0 (T_1, T_2, T_3) | T_2, T_3]=\alpha$
(ii) $E_{\theta_{10}} [T_1 \phi_0 (T_1, T_2, T_3) | T_2, T_3]=\alpha E_{\theta_{10}} (T_1 | T_2, T_3)$
Considering that (see here)
$$\frac{\bar{X}-\bar{Y}-(\mu_1 -\mu_2)}{S_p\sqrt{\frac{1}{m}+\frac{1}{n}}}\sim T_{m+n-2}$$
with $S^2_p=\frac{(m-1)S_1^2+(n-1)S_2^2}{m+n-2}$. Hence, for $$\color{blue}{H_0: \mu_1- \mu_2= \theta}$$
you can use the test with the following test statistic: $$\color{blue}{T = \frac{\bar{X}-\bar{Y}-\theta}{S_p\sqrt{\frac{1}{m}+\frac{1}{n}}}}$$
and critical region:
$$\color{blue}{C= \mathbb R \setminus (-t_{m+n-2, \frac{\alpha}{2}}, t_{m+n-2, \frac{\alpha}{2}})}$$
where $\alpha$ is the significance level of the test.