Here is the answer rewritten to avoid the transfinite induction.
Given a topological space $X$, let $X'$ denote the set of non-isolated points of $X$.
Definition. Given a homeomorphism $T: X\to X$, a point $x\in X$ is called recurrent (with respect to $(X,T)$) if
for each neighborhood $U$ of $x$ there exists $n\ge 1$ such that $T^n(x)\in U$.
This condition is weaker than almost periodic.
Lemma 1. Let $X$ be a countable compact metrizable space, $T: X\to X$ a homeomorphism. Then every recurrent point
$x\in X$ is periodic.
Proof. Consider the collection ${\mathcal I}_x$ of all compact $T$-invariant subsets of $X$ containing $x$. Let $C_x$ denote the intersection of all members of ${\mathcal I}_x$. Clearly, $C_x\in {\mathcal I}_x$. I claim that $x$ is an isolated point
of $C_x$. Indeed, since $C_x$ is countable and compact metrizable, it has some isolated points, $C'_x\ne C_x$. If $x\in C'_x$ then $C'_x\in {\mathcal I}_x$ and $C'_x$ is strictly smaller than $C_x$, which is a contradiction. Hence, $x$ is isolated in $C_x$. The point $x$ is still recurrent with respect to $(C_x,T)$. Since $x$ is isolated in $C_x$, $\{x\}$ is a neighborhood of $x$ in $C_x$. Hence, by recurrence, there exists $n\ge 1$ such that $T^n(x)\in \{x\}$, i.e. $T^n(x)=x$, i.e. $x$ is $T$-periodic. qed
This answers Question 1. To answer Question 2, I will prove a stronger result:
Lemma 2. Let $X$ be a nonempty compact metrizable topological space, $T: X\to X$ is a homeomorphism. Then $X$ contains recurrent points. Equivalently, $X$ contains a $T$-invariant compact nonempty subset $X_0$ such that every $T$-orbit in $X_0$ is dense in $X_0$.
Proof. Consider the poset ${\mathcal I}$ of all nonempty $T$-invariant compact subsets of $X$ (with the partial order given by inclusion). Clearly, the intersection of members of each totally ordered (nonempty) subset in ${\mathcal I}$ belongs to ${\mathcal I}$. Hence, by Zorn's Lemma, ${\mathcal I}$ contains a minimal element $X_0$. By the minimality, every $T$-orbit in $X_0$ is dense (otherwise, take the closure of a non-dense $T$-orbit in $X_0$). qed
Combining the two lemmata, we see that if $X$ is countable, compact, metrizable, nonempty, then for each homeomorphism $T: X\to X$, there exists a $T$-periodic point.
Best Answer
With your notations, its orbit is also $O=\lbrace x.r : r \in [0,P] \rbrace$. So it is the continuous image of the compact $[0,P]$ by the application $r \mapsto x.r$, so it is compact, so it is closed.