Let $\pi_1 : \mathbb{R}\times \mathbb{R}\to \mathbb{R}$ be the projection on the first coordinate. Let $A$ be the subspace of $\mathbb{R}\times \mathbb{R}$ consisting of all points $(x,y)$ for which either $x\geqslant 0$ or $y=0$ (or both) and let $q:A\to \mathbb{R}$ be obtained by restricting $\pi_1$
To prove that the function $q$ is continuous I have to show that for an open set $U$ in $\mathbb{R}$ that the set below is open in $\mathbb{R}\times\mathbb{R}$.
$\left((U \cap [0,\infty)\right)\times \mathbb{R}) \cup (U\times \{0\})$
The function is continuous and so the set should be open. However, $[0,\infty)$ and $\{0\}$ are not open sets in $\mathbb{R}$ and so I don't see how this set is in the box topology of $\mathbb{R}\times\mathbb{R}$.
$q^{-1}(U)=(U \times \mathbb{R}) \cap A$. Since $U \times \mathbb{R}$ is a product of open sets, it is open in $\mathbb{R}\times \mathbb{R}$ and so the intersection with $A$ is open in the subspace $A$ by definition of the subspace topology.