U can easily show that:
$[0,1]\subset \mathbb R$ can not be written as countable union of closed and disjoint sets $\implies $ $\mathbb N$ with the cofinite topology is not patch-connected
Prove: If $\mathbb N$ where patch-connected then there is a continuous map $\gamma :[0,1] \rightarrow \mathbb N$ such that $\gamma(0)=x$ and $\gamma(1)=y$ for all x,y $\in \mathbb N$. Then $[0,1]=\gamma^{-1}(\mathbb N)=\gamma^{-1}(\bigcup_{i=1}^{\infty}\{i\})=\bigcup_{i=1}^{\infty}\gamma^{-1}\{i\}$ Since finite elements in the confinite topology are closed and $\gamma$ is continuous we have a countable union of closed disjoints sets. A contradiction.
Now it is enough to prove that there does not exist such an union.
Here is the basic idea: (Again by contradiction)
1) Suppose that $\bigcup_{i=1}^{\infty}B_n=[0,1]$ with closed and disjoint $B_n$
2) Construct a decreasing sequence of closed intervals $...I_4 \subset I_3 \subset I_2 \subset I_1 \subset [0,1]$ such that $B_n \cap I_n =\emptyset$
3) The set $\bigcap_{n=1}^{\infty}I_n$ is not empty. Let $x$ be an element of the set. Then $x$ is element of every $I_n$ and of exactly one $B_n$, hence $B_j \cap I_j=\{x\}$ for one $j\in \mathbb N$. A contradiction. The statement follows.
I left the construction of the intervals $I_n$ by the reader :)
Your argument doesn't quite work, because the range could be a finite subset of $\mathbb R$ containing at least two elements. Then there is no guarantee that $f^{-1} (y)$ of the particular $y = f(x')$ that you have chosen is not co-finite. Importantly, $f$ may fail to be one-to-one, which appears to be something that you are assuming.
An important thing to remember about $\mathbb R$ with the usual topology is that it is Hausdorff. This is the central important fact for this problem. In fact, for any infinite space $X$ with the co-finite topology and any Hausdorff space $Y$, the only continuous functions $f : X \to Y$ are constant.
Proof. Suppose that $f : X \to Y$ is a nonconstant continuous function. Then there are distinct $u,v \in Y$ in the range of $f$. By Hausdorffness there are disjoint open sets $U,V \subseteq Y$ with $u \in U$ and $v \in V$. By continuity both $f^{-1}(U)$ and $f^{-1}(V)$ are open and nonempty, so they are co-finite. But then the intersection $f^{-1} (U) \cap f^{-1} (V)$ must be nonempty, which is impossible as $$f^{-1} (U) \cap f^{-1} (V) = f^{-1} ( U \cap V ) = f^{-1} ( \emptyset ) = \emptyset.$$
Best Answer
To show that $f$ is continuos, we have to show that for all $A$ open set of $\mathbb N$, $f^{-1}(A)$ is an open set. An open set of $\mathbb N$ with the co-finite topology is a set such that $\mathbb N \ \backslash A$ is finite. Hence we have to show that $f^{-1}(A)$ is a set such that $\mathbb N \ \backslash \ f^{-1}(A)$ is finite.
Now: $$\mathbb N \ \backslash \ f^{-1}(A) = \{n\in \mathbb N \ | \ n^3\notin A\} = f^{-1}(\mathbb N\ \backslash \ A)$$
By hypotesis $\mathbb N \ \backslash A$ is finite, and the map $f$ is injective; hence $\mathbb N \ \backslash \ f^{-1}(A)$ is finite.