Exists a continuous function $f: \mathbb R \to \mathbb R$ with $f(x_n) = y_n, \, \forall n$ and $f(x) = y$ Let $x_n \to x$ and $y_n \to y$ in $\mathbb R$ such that $x_n \neq x_m, \, \forall n \neq m$.
How can I show the existance of a continuous function $f: \mathbb R \to \mathbb R$ with $f(x_n) = y_n, \, \forall n$ and $f(x) = y$?
I've trying to solving this problem in the last few days, however I didn't have any idea. I'm looking for a hint to solve this question.
Help?

Here's a generalization: Let $X$ be a metric space, $x\in X,$ and $x_n$ is a sequence of distinct points in $X\setminus \{x\}$ converging to $x.$  Let $y,y_n$ be as before. Then there exists a continuous $f:X\to \mathbb R$ such that $f(x_n)=y_n, n=1,2,\dots$ and $f(x)=y.$
Proof (sketch): Let $E=\{x_n\}\cup \{x\}.$ Then $E$ is closed in $X.$ Define $g:E \to \mathbb R$ by setting $g(x_n)=y_n, n=1,2,\dots$ and $g(x)=y.$ Then $g$ is continuous on $E.$ By Tietze's extension theorem, there exists a continuous $f:X\to \mathbb R $ such that $f=g$ on $E.$ That does it.
