Terence Tao, Analysis I, Ex. 5.4.5: There is a rational between any two reals
Why would you want to do it by contradiction? It's easier to do it directly. If $y-x>0$ then there is an integer $N$ such that $y-x>1/N>0$, which means that $Ny-Nx>1$ and this implies that there is an integer $m$ such that $Nx<m<Ny$ and finally that $x<\frac{m}{N}<y$.
If there was no $q\in\mathbb{Q}$ such that $x<q<y$ then there are no $m\in\mathbb{Z} , n\in\mathbb{Z}^*$ such that $$x<\frac{m}{n}<y$$ $$\Rightarrow\quad \forall n\in\mathbb{N}^*\quad nx\geq \lfloor ny \rfloor$$ $$\Rightarrow\quad \forall n\in\mathbb{N}^*\quad ny-nx\leq ny-\lfloor ny \rfloor<1$$Thus for all $n\in\mathbb{N}^*$ $ny-nx\leq1$ this implies that $\forall n\in\mathbb{N}^*$ $y-x\leq \frac{1}{n}$ contradiction with exercise 5.4.4 since $y-x$ is a positive number.
(i).Suppose $0\le x<y$ and $\Bbb Q\cap (x,y)=\emptyset.$
There exists $N\in \Bbb N$ with $1/N<(y-x)/2.$
There exists $n\in \Bbb N$ with $n(1/N)\ge x.$ This is obvious if $x=0.$ And if it were false with $x>0$ then $1/n> x'=1/(Nx)>0$ for all $n\in \Bbb N,$ contrary to 5.4.4.
Let $n_0=\min \{n\in \Bbb N: n(1/N)\ge x\},$ so $(n_0-1)/N<x\le n_0/N.$
Then $x<(n_0+1)/N,$ so $y\le(n_0+1)/N,$ otherwise $(n_0+1)/N\in \Bbb Q\cap (x,y).$ But then $$2/N=(n_0+1)/N-(n_0-1)/N \ge$$ $$\ge y-(n_0-1)/N>$$ $$> y-x>2/N,$$ a contradiction.
(ii).If $x<y\le 0$ then by (i) there exists $q\in \Bbb Q\cap (-y,-x),$ so $\;-q\in \Bbb Q\cap (x,y).$
(iii).Finally, if $x<0<y$ then $0\in \Bbb Q\cap (x,y).$
The idea behind (i) is that if $N$ is large enough then consecutive values of $1/N,2/N,3/N,...$ cannot "skip over" the interval $(x,y).$