We let $\mathbb{F}=\mathbb{Q}(x_1,x_2,x_3)$ and $\mathbb{K}=\mathbb{Q}(u_1,u_2)$ be the field of rational functions in indeterminates $x_1,x_2,x_3$ and $u_1,u_2$, respectively. We define a map:
$ \pi: \begin{cases} \mathbb{F} \rightarrow \mathbb{K} \\ x_1,x_3 \mapsto u_1 \\ x_2 \mapsto u_2 \end{cases} $
We want to show that $\pi$ is a ring homomorphism. Let $f,g \in \mathbb{F}$ be expressed as $f=\frac{p_1(x_1,x_2,x_3)}{q_1(x_1,x_2,x_3)}$ and $g=\frac{p_2(x_1,x_2,x_3)}{q_2(x_1,x_2,x_3)}$ ($p_1,q_1,p_2,q_2$ are over $\mathbb{Z}$). Then $\pi(f)=\frac{p^{'}_1(u_1,u_2)}{q^{'}_1(u_1,u_2)}\in \mathbb{K}$ and $\pi(g)=\frac{p^{'}_2(u_1,u_2)}{q^{'}_2(u_1,u_2)}\in \mathbb{K}$. We will often write $p$ for a polynomial $p(x_1,\dots,x_n)$. We then have that: \begin{equation} \pi(f+g)=\pi(\frac{p_1q_2 + p_2q_1}{q_1q_2})=\frac{p_1^{'}q_2^{'}+p_2^{'}q_1^{'}}{q_1^{'}q_2^{'}}=\frac{p_1^{'}}{q_1^{'}} + \frac{p_2^{'}}{q_2^{'}} = \pi(f)+\pi(g), \end{equation} and that \begin{equation} \pi(fg) = \frac{p_1^{'}}{q_1^{'}}\frac{p_2^{'}}{q_2^{'}}=\pi(f)\pi(g). \end{equation} Moreover, $\pi(1_\mathbb{F})=\pi(\frac{p}{p})=\frac{p^{'}}{p^{'}}=1_{\mathbb{K}}$ and so $\pi$ is a ring homomorphism, as required. Is this correct?
Given a field $K$ and a ring $R$, it known that any well-defined homomorphism $f:K\to R$ is either trivial (if you allow that kind of homomorphism), or injective. Indeed, if $f(a) = 0$ for some $a\neq 0$, then $$f(1) = f\left(a\cdot \frac1a\right) = f(a)\cdot f\left(\frac1a\right) = 0$$In this case, however, you have $\pi(x_1-x_3) = 0$, yet $\pi$ is not trivial. So it cannot be a homomorphism.