Let the function $d \colon \mathbb{R}^2 \longrightarrow \mathbb{R}$ be defined by $$ d\big( (x, y) \big) := \lvert x-y \rvert \qquad \mbox{ for all } (x, y) \in \mathbb{R}^2. $$ Let $\mathbb{R}$ and $\mathbb{R}^2$ have their usual topologies. Then how to show that this function $d$ is continuity by showing that the inverse image of every basic open set in the co-domain space $\mathbb{R}$ is an open set in the domain space $\mathbb{R}^2$?
My Attempt:
Let $u$ and $v$ be any real numbers such that $u < v$, and let us put $$ ] u, v[ := \{ r \in \mathbb{R} \colon u < r < v \}. $$ Then we have $$ \begin{align} d^{-1} \big( ]u, v[ \big) &= \left\{ (x, y) \in \mathbb{R}^2 \colon d \big( (x, y) \big) \in ]u, v[ \right\} \\ &= \left\{ (x, y) \in \mathbb{R}^2 \colon u < d\big( (x, y) \big) < v \right\} \\ &= \left\{ (x, y) \in \mathbb{R}^2 \colon u < \lvert x-y \rvert < v \right\} \\ &= \begin{cases} \left\{ (x, y) \in \mathbb{R}^2 \colon 0 \leq \lvert x-y \rvert < v \right\} \ \mbox{ if } u < 0 \\ \left\{ (x, y) \in \mathbb{R}^2 \colon u < \lvert x-y \rvert < v \right\} \ \mbox{otherwise} \end{cases} . \end{align} $$
How to proceed from here?
Of course, there are other, perhaps easier, proofs of this result using the methods of advanced calculus (i.e. elementary real analysis), but I would like to do it using these elementary and purely topological methods.
PS:
Based on the advice offered in the comments below, I proceed as follows:
Thus we have \begin{align} & \ \ \ d^{-1} \big( ]u, v[ \big) \\ &= \begin{cases} \left\{ (x, y) \in \mathbb{R}^2 \colon 0 \leq \lvert x-y \rvert < v \right\} \ \mbox{ if } u < 0 \\ \left\{ (x, y) \in \mathbb{R}^2 \colon u < \lvert x-y \rvert < v \right\} \ \mbox{otherwise} \end{cases} \\ &= \begin{cases} \bigcup_{x \in \mathbb{R} } \left\{ (x, y) \in \mathbb{R}^2 \colon -v < x-y < v \right\} \ \mbox{ if } u < 0 \\ \bigcup_{x \in \mathbb{R} } \left[ \left\{ (x,y) \in \mathbb{R}^2 \colon u < x-y < v \right\} \cup \left\{ (x, y) \in \mathbb{R}^2 \colon -v < x-y < -u \right\} \right] \ \mbox{ otherwise} \end{cases} \\ &= \begin{cases} \bigcup_{x \in \mathbb{R} } \left\{ (x, y) \in \mathbb{R}^2 \colon -v < y-x < v \right\} \ \mbox{ if } u < 0 \\ \bigcup_{x \in \mathbb{R} } \left[ \left\{ (x, y) \in \mathbb{R}^2 \colon -v < y-x < -u \right\} \cup \left\{ (x, y) \in \mathbb{R}^2 \colon u < y-x < v \right\} \right] \ \mbox{ otherwise} \end{cases} \\ &= \begin{cases} \bigcup_{x \in \mathbb{R} } \left\{ (x, y) \in \mathbb{R}^2 \colon x-v < y < x+v \right\} \ \mbox{ if } u < 0 \\ \bigcup_{x \in \mathbb{R} } \left[ \left\{ (x, y) \in \mathbb{R}^2 \colon x-v < y < x-u \right\} \cup \left\{ (x, y) \in \mathbb{R}^2 \colon x+u < y < x+v \right\} \right] \ \mbox{ otherwise} \end{cases} \\ &= \begin{cases} \bigcup_{x \in \mathbb{R} } \{ x \} \times ]x-v, x+v[ \ \mbox{ if } u < 0 \\ \bigcup_{x \in \mathbb{R} } \big[ \big( \{ x \} \times ] x-v, x-u [ \big) \cup \big( \{ x \} \times ] x+u, x+v [ \big) \big] \ \mbox{ otherwise}. \end{cases} \end{align}
Is what I've done so far correct in each and every detail? If so, then what next? How to proceed from here?
Or, are there any mistakes or errors in what I've done up to now?