Let $(E,d)$ be a metric space, $B\subseteq E$ be closed and nomepty, $x:[0,\infty)\to E$, $I:=\{t\ge0:x(t)\in B\}$ and $\tau:=\inf I$. If $I$ is nonempty and $\tau\in I$, then we easily see$^1$ that $$\tau\le t\Leftrightarrow\exists s\in I:s\le t\tag1$$ for all $t\ge0$. Moreover, if $I$ is nonempty and $x$ is right-continuous, then $\tau\in I$.
Are we able to show that if $t\in[0,\infty)\cap\mathbb Q$, then $$\tau\le t\Leftrightarrow\exists s\in I\cap\mathbb Q:s\le t?\tag2$$
We may clearly use that $\mathbb Q$ is dense in $\mathbb R$, but I'm still not sure how to argue. If necessary, feel free to assume that $x$ is right-continuous.
$^1$ "$\Rightarrow$": Assume the contrary. Then $$\forall s\in I:s>t\tag3$$ and hence $t$ is a lower bound for $I$. Thus, $$t\le\tau$$ by definition of the infimum and hence $$t=\tau\in I;$$ in contradiction to $(3)$.
"$\Leftarrow$": Let $s\in I$ with $s\le t$. Since $\tau$ is a lower bound for $I$, $$\tau\le s\le t.$$
It occurs to me to do this:
Let $I:=\{t\ge0:x(t)\in B\}$ such that $I\cap \mathbb Q\neq \emptyset$ and $\tau:=\inf I$, I saw that you want to use the continuity of x so you can use it to see: $$\tau:=\inf I\Rightarrow \exists (t_n)\in [0,\infty)\text{ such that } t_n\to\tau \Rightarrow x(t_n)\to x(\tau)\in B,\text{ since } B \text{ is closed}.$$ In other words $\tau=\min I$. Then we want to demonstrate $$\tau\leq u, (\text{with }u\in\mathbb Q)\;\text{ iff }\;x(s)\in B\text{ for some rational }s\leq u$$ or equivalently $$\tau> u, (\text{with }u\in\mathbb Q)\;\text{ iff }\;x(s)\not\in B\text{ for all rational }s\leq u$$ $(\Rightarrow)$ Suppose as a hypothesis that $\tau>u$. Suppose as an auxiliary hypothesis $x(s)\in B$ for some rational $s\leq u(<\tau)$. Which is a contradiction to the infimo.
$(\Leftarrow)$ Since $$x(s)\not\in B\text{ for all rational }s\leq u\Rightarrow x(s)\not\in B\text{ for all real }s\leq u$$ This is for the continuity of $x(t)$. Then $x>u$, therefore $\tau\geq u$. But since $u\leq u$ is rational we have that $x(u)\not\in B$. Since $\tau$ is the minimum then $\tau>u$.