Let $X_i$ ($i=1,\dots, n$) be a random sample from $X\sim \exp(\lambda_1)$ and $Y_j$ ($j=1,\dots, m$) be a random sample from $Y\sim \exp(\lambda_2)$, and $X$ and $Y$ be independent. I try to find the generalized test of $H_0: \lambda_1=\lambda_2$ v.s. $H_1: \lambda_1\neq \lambda_2$. Find the distribution of the statistic and the critical region of the generalized test at level $\alpha$.
My work: The likelihood function is that for $\theta=(\lambda_1, \lambda_2)$ $$ L(\theta)=\lambda_1^n\lambda_2^m \exp(-n\lambda_1\bar{X}-m\lambda_2\bar{Y}) $$ where $\bar{X}$ and $\bar{Y}$ are sample mean.
Then I want to get the likelihood ratio statistic: \begin{align} \Lambda(x) &= \frac{\sup_{\theta=\theta_0}L(\theta\mid X)}{\sup_{\theta\neq\theta_0}L(\theta\mid X)} \end{align}
The global MLE are $\hat{\lambda}_1=\frac{1}{\bar{X}}$ and $\hat{\lambda}_2=\frac{1}{\bar{Y}}$. The restricted MLE for $\lambda_1=\lambda_2$ is $$\lambda_0=\frac{m+n}{n\bar{X}+m\bar{X}}$$
So we have $$ \Lambda=\frac{(m+n)^{m+n}}{n^nm^m}[\frac{n\bar{X}}{n\bar{X}+m\bar{Y}}]^n[1-\frac{n\bar{X}}{n\bar{X}+m\bar{Y}}]^m $$
So we take the statistic $$T=\frac{n\bar{X}}{n\bar{X}+m\bar{Y}}$$
So to find the critical region, we need $$\Lambda=CT^n(1-T)^m\le \lambda_0$$
From here, I am not sure how to solve that. It seems that $CT^n(1-T)^n$ is decreasing if $T\le n/(n+m)$ and increasing is $T\ge n/(m+n)$. (since $g'(T)=T^{n-1}(1-T)^{m-1}[n-(m+n)T]$)
So $\Lambda\le \lambda_0$ (we will reject $H_0$) is equivalent as $$c_1\le T\le c_2$$ for some constants $0<c_1<c_2$ and it satisfy $$c_1^n(1-c_1)^m=c_2^n(1-c_2)^m$$
For the test level $\alpha$, we also need $$ P(c_1\le T\le c_2)=\alpha $$ (the probability that we reject $H_0$).
The distribution of $T$: under $H_0$ we have $\sum X_i\sim Gamma(n,1/\lambda)$ and $\sum X_i+\sum Y_j\sim Gamma(n+m,1/\lambda)$. Then $$ \frac{m+n}{n}T\sim \frac{\chi^2(2n)/(2n)}{\chi^2(2(m+n))/(2(m+n))}\sim F(2n, 2(m+n)). $$
But what is the critical region?