In measure and category by Oxtoby, page $8,$ the author stated the following:
Let $$E = \mathbb{Q}' \cap \bigcap_{n=1}^\infty \bigcup_{q=2}^\infty\bigcup_{p=-\infty}^\infty (\frac{p}{q}-\frac{1}{q^n},\frac{p}{q}+\frac{1}{q^n}).$$ For any two positive integers $m$ and $n$ we have $$E \cap (-m,m) \subseteq \bigg(\bigcup_{q=2}^\infty\bigcup_{p=-\infty}^\infty (\frac{p}{q}-\frac{1}{q^n},\frac{p}{q}+\frac{1}{q^n}) \bigg) \cap (-m,m) \subseteq \bigcup_{q=2}^\infty \bigg(\bigcup_{p=-\infty}^\infty (\frac{p}{q}-\frac{1}{q^n},\frac{p}{q}+\frac{1}{q^n} ) \cap(-m,m) \bigg) \subseteq \bigcup_{q=2}^\infty \bigcup_{p=-mq}^{mq} (\frac{p}{q}-\frac{1}{q^n},\frac{p}{q}+\frac{1}{q^n})$$
Question: I do not understand how author obtain the following inclusion $$\bigcup_{q=2}^\infty \bigg(\bigcup_{p=-\infty}^\infty (\frac{p}{q}-\frac{1}{q^n},\frac{p}{q}+\frac{1}{q^n} ) \cap(-m,m) \bigg) \subseteq \bigcup_{q=2}^\infty \bigcup_{p=-mq}^{mq} (\frac{p}{q}-\frac{1}{q^n},\frac{p}{q}+\frac{1}{q^n}).$$
It would be good if someone can provide hint.
Note that $$\left(\frac{p}{q} - \frac{1}{q^n}, \frac{p}{q} + \frac{1}{q^n}\right)$$ has empty intersection with $(-m,m)$ if either $$\frac{p}{q} - \frac{1}{q^n} \geq m$$ or $$\frac{p}{q} + \frac{1}{q^n} \leq -m$$ The first inequality is equivalent to $$p \geq mq + \frac{1}{q^{n-1}}$$ and the second is equivalent to $$p \leq -mq - \frac{1}{q^{n-1}}$$ Therefore we don't need to take the union over all $p$. We are free to exclude those $p$ which satisfy either of the above inequalities. We are left with those $p$ which satisfy $$-mq - \frac{1}{q^{n-1}} < p < mq + \frac{1}{q^{n-1}}$$ I assume that $n$ is a positive integer, in which case $1/q^{n-1} \leq 1$. Since $p$ is an integer, this means that the previous inequality is equivalent to $$-mq \leq p \leq mq$$ Thus, instead of taking $\bigcup_{p=-\infty}^{\infty}$ and intersecting with $(-m,m)$, it suffices to take $\bigcup_{p=-mq}^{mq}$.