Let
$$
A:=\{a\in\mathbb Q; |X\cap(-\infty,a)|<\kappa\}\\
B:=\{b\in\mathbb Q; |X\cap(b,+\infty)|<\kappa\}
$$
First let us notice that $A$ is downward-closed and $B$ is upward-closed.
Let us notice that the assumption $A\cup B=\mathbb Q$ leads to a contradiction, since this would mean that there is a real number $$r=\sup A=\inf B$$ and
$$X\subseteq \left(X\cap(-\infty,r)\right)\cup\left(X\cap(r,+\infty)\right)\cup\{r\} = \left(\bigcup_{a\in A} X\cap(-\infty,a)\right)\cup\left(\bigcup_{b\in B} X\cap(b,+\infty)\right)\cup\{r\},$$
i.e., $X$ would be a union of countably many subsets such that each of them has cardinality $<\kappa$.
So we know that $$\mathbb Q\setminus(A\cup B)\ne\emptyset.$$
Is suffices to take arbitrary $q\in\mathbb Q\setminus(A\cup B)$.