Here $\Theta_0:=\{\lambda: \lambda =4\}$ and $\Theta:=\{\lambda:\lambda\leq 4\}.$
Now \begin{align}\frac{\mathrm d}{\mathrm d\lambda}\mathcal L(\lambda|\mathbf x) &=\frac{\mathrm d}{\mathrm d\lambda}\left[n\ln \lambda-\lambda n\bar { x}\right]\\ &= \frac n\lambda-n\bar{ x}.\tag 1\label 1\end{align}\begin{align}\frac{\mathrm d}{\mathrm d\lambda}\mathcal L(\lambda|\mathbf x) &=\frac{\mathrm d}{\mathrm d\lambda}\left[-n\ln \lambda-\frac{ n\bar { x}}{\lambda}\right]\\ &= -\frac n\lambda+\frac{n\bar{ x}}{\lambda^2}.\tag 1\label 1\end{align} From $\eqref 1,$ $$\frac{\mathrm d}{\mathrm d\lambda}\mathcal L(\lambda|\mathbf x) > 0\implies \frac 1\lambda > \bar x \equiv \lambda< \frac1{\bar{x}}.\tag 2\label 2$$$$\frac{\mathrm d}{\mathrm d\lambda}\mathcal L(\lambda|\mathbf x) > 0\implies \lambda <\bar x .\tag 2\label 2$$
If $\frac1{\bar x}\in(0, 4],$${\bar x}\in(0, 4],$ then from $\eqref 2,~\hat{\lambda}_{\text{MLE}}=\frac1{\bar x}.$$\eqref 2,~\hat{\lambda}_{\text{MLE}}={\bar x}.$ If $\frac1{\bar x}\in(4, \infty),$${\bar x}\in(4, \infty),$ then $\hat{\lambda}_{\text{MLE}} =4.$
So, if $\frac1{\bar x}\in(4, \infty),$${\bar x}\in(4, \infty),$ $$\ell(\mathbf x) =1\tag{ 3.I}\label 3$$ and if $\frac1{\bar x}\in(0, 4],$${\bar x}\in(0, 4],$ then $$\ell(\mathbf x) =\frac{4^n\exp(-4n\bar x)}{(1/\bar x)^n\exp(-n)}.\tag{3.II}$$$$\ell(\mathbf x) =\frac{4^{-n}\exp\left(-\frac{n\bar x}{4}\right)}{(1/\bar x)^n\exp(-n)}.\tag{3.II}$$
$\eqref 3$ is trivial.
Observe $$\frac{\mathrm d}{\mathrm d\bar x}\ell(\mathbf x) =k\times \left[n{\bar x}^{n-1}\exp(-4n\bar x)(1-4\bar x)\right].$$$$\frac{\mathrm d}{\mathrm d\bar x}\ell(\mathbf x) =k\times \left[n{\bar x}^{n-1}\exp\left(\frac{-n\bar x}{4}\right)\left(1-\frac{\bar x}4\right)\right].$$
So, when $\frac1{\bar x}\in(0, 4],$${\bar x}\in(0, 4],$
$$\ell(\bar x) < \textrm{some constant}\iff \bar x> \textrm{some other constant}.$$$$\ell(\mathbf x) < \textrm{some constant}\iff \bar x< \textrm{some other constant}.$$
The test function then follows.
Similarly, one can proceed along the same approach for $\mathcal H_1: \lambda > 4.$