Solution (source code)

= Solution

Let $x$ have a dense forward <orbit> $O=\{f^j(x):j\geq0\}$, and suppose that $f$ is <surjective>. Every tail $O_k=\{f^j(x):j\geq k\}$ is then <dense>. Indeed, <continuity> gives
$$
f^k(\overline O)\subseteq\overline{f^k(O)}=\overline{O_k},
$$
and the left side equals $f^k(X)=X$ by <surjectivity>.

Given nonempty <open sets> $U,V$, choose $k\geq0$ with $f^k(x)\in U$. The dense tail $O_{k+1}$ supplies $j\geq k+1$ with $f^j(x)\in V$. Taking $n=j-k\geq1$ gives $f^j(x)\in f^n(U)\cap V$. This proves the required positive-time intersection property.

\b[The result can fail without <surjectivity>.] Take the <compact metric space>
$$
X=\{0\}\cup\{1/j:j\geq1\},qquad
f(0)=0,qquad f(1/j)=1/(j+1),
$$
with the <metric> induced from the <real line>. All nonzero points are <isolated>, so <continuity> there is automatic; at zero, $f(1/j)\to0=f(0)$ proves <continuity>. The forward <orbit> of $1$ is $\{1,1/2,1/3,\ldots\}$, whose <closure> is $X$, so this is <point transitivity>. But $f(X)=X\setminus\{1\}$. The singletons $U=\{1/2\}$ and $V=\{1\}$ are nonempty <open sets>, and for every $n\geq1$,
$$
f^n(U)=\{1/(n+2)\},qquad f^n(U)\cap V=\varnothing.
$$
The isolated initial point can be visited only at the start of the dense forward <orbit>; deleting that initial segment destroys density.