non existence of a continuous function with certain conditions I think there is no a continuous map $f:\mathbb{Q} \rightarrow \mathbb{Q}$ such that
$x,y,z$ are distinct rationals and $f(\{z,y\}) = \{x\}$ and $f^{-1}\{x\} = \{y,z\}$ and $f$ is bijective on $\mathbb{Q} - \{y,z\}$.
My try: If it were one, then take the open basic set $x \in (a,b) = (a,x) \cup \{x\} \cup (x,b)$, then $f^{-1}(a,b)$ = open $\cup \{y,z\} \cup $ open = open $\cup \{y,z\}$ open cann't be open as they are pairewise disjoint. Am I right?

Assume that $y<z$. Let $\langle\alpha_n:n\in\Bbb N\rangle$, $\langle\beta_n:n\in\Bbb N\rangle$, $\langle\gamma_n:n\in\Bbb N\rangle$, and $\langle\delta_n:n\in\Bbb N\rangle$ be strictly monotonic sequences of irrational numbers such that $\alpha_n\nearrow y$, $\beta_n\searrow y$, $\gamma_n\nearrow z$, $\delta_n\searrow z$, and $\beta_0=\gamma_0$. Let $L=\Bbb Q\cap(\leftarrow,\alpha_0)$ and $R=\Bbb Q\cap(\delta_0,\to)$. For $n\in\Bbb N$ let $A_n=\Bbb Q\cap(\alpha_n,\alpha_{n+1})$, $B_n=\Bbb Q\cap(\beta_{n+1},\beta_n)$, $C_n=(\gamma_n,\gamma_{n+1})$, and $D_n=\Bbb Q\cap(\delta_{n+1},\delta_n)$.
Let $\langle\eta_n:n\in\Bbb N\rangle$ and $\langle\rho_n:n\in\Bbb N\rangle$ be strictly monotonic sequences of irrational numbers such that $\eta_n\nearrow x$ and $\rho_n\searrow x$. Let $L'=\Bbb Q\cap(\leftarrow,\eta_0)$ and $R'=\Bbb Q\cap(\rho_0,\to)$, and for $n\in\Bbb N$ let $E_n=\Bbb Q\cap(\eta_n,\eta_{n+1})$ and $F_n=\Bbb Q\cap(\rho_{n+1},\rho_n)$.
$L,L',R,R'$, and all of the sets $A_n,B_n,C_n,D_n,E_n$, and $F_n$ are homeomorphic to $\Bbb Q$, and all are clopen subsets of $\Bbb Q$, so the following order-isomorphisms (which are also homeomorphisms) exist:
$$\begin{align*}
g_L&:L\to L'\\
g_R&:R\to R'\\
g_{A_n}&:A_n\to E_{2n}\\
g_{B_n}&:B_n\to E_{2n+1}\\
g_{C_n}&:C_n\to F_{2n+1}\\
g_{D_n}&:D_n\to F_{2n}
\end{align*}$$
Let $$f=\{\langle y,x\rangle,\langle z,x\rangle\}\cup g_L\cup g_R\cup\bigcup_{n\in\Bbb N}\left(g_{A_n}\cup g_{B_n}\cup g_{C_n}\cup g_{D_n}\right)\;;$$
then $f:\Bbb Q\to\Bbb Q$ is continuous, $f(y)=f(z)=x$, and $f\upharpoonright\left(\Bbb Q\setminus\{y,z\}\right)$ is a homeomorphism onto $\Bbb Q\setminus\{x\}$.
(I strongly recommend drawing a picture of the decompositions of the domain and range.)
