GLR Test for 2 samples from exponential distributions

I am trying to solve this complicated Generalised Likelihood Ratio Test problem for 2 samples as part of my independent study course. However, the book that I am using does not talk about 2 samples at all; all the examples provided are 1 sample questions.

The question:

Assume that $$X_1, ...,X_m$$ is a random sample from $$\theta_1e^{-\theta_1x}I_{(0,\infty)}(x)$$ and $$Y_1, ...,Y_n$$ is a random sample from $$\theta_2e^{-\theta_2y}I_{(0,\infty)}(y)$$. If we assume the samples are independent. What is the GLR for testing $$H_0:\theta_1=\theta_2$$ vs. $$H_0:\theta_1\ne\theta_2$$?

So far I just got to $$\Lambda=\frac{L(\theta,\theta)}{L(\theta_1,\theta_2)}=\frac{\theta^{m+n}\exp[-\theta\sum x_i+\sum y_i]}{\theta_1^m\exp[-\theta_1\sum x_i]\theta_2^n \exp[-\theta_2\sum y_i]}$$

However, I don't know what I should do for the next step. They say it should be an F test but I just can't see it.

I appreciate your time and help!

The likelihood function given the sample $$\mathbf x=(x_1,\ldots,x_m,y_1,\ldots,y_n)$$ is

$$L(\theta_1,\theta_2)=\theta_1^m\theta_2^n\exp\left(-\theta_1\sum_{i=1}^m x_i-\theta_2\sum_{i=1}^n y_i\right)\mathbf1_{x_1,\ldots,x_m,y_1,\ldots,y_n>0}\quad,\,\theta_1,\theta_2>0$$

Unrestricted MLE of $$(\theta_1,\theta_2)$$ is $$(\hat\theta_1,\hat\theta_2)=\left(\frac{1}{\bar x},\frac{1}{\bar y}\right)$$

Restricted MLE of $$(\theta_1,\theta_2)$$ when $$\theta_1=\theta_2=\theta$$ (say) is

$$\hat\theta=\frac{m+n}{m\bar x+n\bar y}$$

So the LR test statistic for testing $$H_0$$ is

$$\Lambda(\mathbf x)=\frac{\sup_{\theta_1=\theta_2}L(\theta_1,\theta_2)}{\sup_{\theta_1,\theta_2}L(\theta_1,\theta_2)}=\frac{L(\hat\theta,\hat\theta)}{L(\hat\theta_1,\hat\theta_2)}$$

Substituting the values of $$\hat\theta_1,\hat\theta_2,\hat\theta$$, the terms in the exponent of $$e$$ vanish, and I get

$$\Lambda(\mathbf x)=\bar x^m\bar y^n\left(\frac{m+n}{m\bar x+n\bar y}\right)^{m+n}$$

The above can be rewritten to get a 'nice' form:

\begin{align} \Lambda(\mathbf x)&=\underbrace{\text{constant}}_{>0}\left(\frac{m\bar x}{m\bar x+n\bar y}\right)^m\left(\frac{n\bar y}{m\bar x+n\bar y}\right)^n \\&=\text{constant}\cdot\,t^m(1-t)^n\qquad,\text{ where }t=\frac{m\bar x}{m\bar x+n\bar y} \\&=g(t)\quad,\,\text{say} \end{align}

Now you have to study the nature of the function $$g$$, keeping in mind that we reject $$H_0$$ when $$\Lambda(\mathbf x) for some $$c$$ subject to a level restriction.

As for why this should be an $$F$$ test, note that

$$X_i\stackrel{\text{ i.i.d }}\sim\text{Exp with mean }1/\theta_1\implies 2\theta_1 X_i\stackrel{\text{ i.i.d }}\sim\text{Exp with mean }2\equiv \chi^2_2$$

So summing over independent chi-square variables, $$2m\theta_1\overline X\sim\chi^2_{2m}$$

Similarly, $$2n\theta_2\overline Y\sim\chi^2_{2n}$$

And since both samples are independent, our test statistic is

$$\frac{\theta_1\overline X}{\theta_2\overline Y}\sim F_{2m,2n}$$