Yes, you are wright. Simply find $C$ from equality $1-(C/\theta_0)^n=0{.}05$.
Why not to use $X_{max}$ to construct $L$?
Find the probability $$P_\theta(X_{max}\leq t)=(t/\theta)^n=0.95.$$
Then $t/\theta=\sqrt[n]{0.95}$, $t=\sqrt[n]{0.95}\theta$. Finally,
$$
P_\theta(X_{max}\leq \sqrt[n]{0.95}\theta)=P_\theta(\theta\geq X_{max}/\sqrt[n]{0.95})=0.95.
$$
So $L(X_1,\ldots,X_n)=\dfrac{X_{max}}{\sqrt[n]{0.95}}$.
- Use definition of a power of a test.
Several approaches are possible. One is to get an exact P-value and reject $H_0$ at the 5% level if it is smaller than 0.05.
Intuitively, you have observed $X = 5$ which might be taken as evidence that $\theta > 3.$ The question is whether 5 is enough bigger than 3 to be
considered 'significantly' bigger and thus reject $H_0.$
Formaly, the $=$-sign in the null hypothesis determines the 'null distribution'
used in testing. Here that's $\mathsf{Pois}(\theta = 3.)$ The P-value is
the probability of a result 'as extreme or more extreme' than 5 (in the direction of $H_1.)$
That means we want $P(X \ge 5\,|\,\theta = 3).$ You can evaluate that
using the Poisson PDF function, using a printed table of Poisson probabilities (if available), or using software. (I don't think this is
a good situation for a normal approximation.) In R statistical software
(where ppois
is a Poisson CDF) we use $P(X \ge 5) = 1 - P(X \le 4) = 0.1845.$
Thus the P-value exceeds 5% and we do not reject $H_0.$
1 - ppois(4, 3)
## 0.1847368
x = 0:4; 1- sum(dpois(x,3))
## 0.1847368
The second computation in R sums five probabilities: $P(X = 0), \dots,
P(X=4),$ where $X \sim \mathsf{POIS}(3),$ which may be mildly tedious
but certainly possible to do on a calculator.
In the figure below, the P-value is the sum of the heights of the black bars
to the right of the vertical red dashed line.
Note: You might be wondering just how large $X$ would have to be in order to
reject $H_0.$ The computation in R below shows that $X = 7$ would lead
to rejection at the $3.34\%$ level.
qpois(.95, 3) # Inverse CDF or quantile function
## 6
1 - ppois(6, 3)
## 0.03350854 # P(X >= 7) = 0.034
Best Answer
I suspect you mean to say you would reject $H_0$ when $\hat{X}=22$. You would also reject $H_0$ when $\hat{X}=21$ since that too is inconsistent with $N=20$.
You take $\alpha$ into account in deciding whether to reject $H_0$ when $\hat{X}=20$ or particular smaller values. For that you need some calculations
Note that the answer depends on $n$, which you have not specified.
In practice, since $\hat{X}$ is an integer and by the two hypotheses cannot exceed $22$, the rejection region for $\alpha=0.05$ would be when $\hat{X} \in \{20,21,22\}$ when $n=1$ and $\hat{X} \in \{21,22\}$ when $n \gt 1$