In the book they solve it by taking examples. Let x be this,y that,z and y those and they just put in condition. But all values do not give same result.
I took $x$, $y$, $z$ as $\sqrt 3$, $\sqrt 2$ and $4$. Let $(x,y),\ (y,z) \in R$, $xy\in R$ and $yz\in R$ that gives $xy= \sqrt 6$ and $yz=4\sqrt 2$. On solving for $x$ and $z$ from these equations and they multiplying $x$ and $z$, $xz= \sqrt 6$ which is irrational and $(x,z)\in R$ but in answer they solved it like

How different results from different values?