You are mostly right, just need to sort notation out.
Continuity happens at a point, and if it happens at every point then it happens in the space. So first we need to fix a point, say $z = (z_1,z_2) \in \mathbb R^2$.
Now, the definition of continuity is : For all $\epsilon > 0$, there is $\delta > 0$ such that $||\mathbf{x} - z|| \leq \delta \implies |f(\mathbf x)-f(z)| < \epsilon$. (Here, $\mathbf x \in \mathbb R^2$). $\mathbb R^2$ is normally equipped with Euclidean norm (although you can show that all norms are equivalent, so we can switch norms), so I will persist with it here.
Now, if $\mathbf x= (x_1,x_2)$, then $|f(\mathbf x)-f(z)| = |x_1 - z_1|$. On the other hand, $||\mathbf x - z|| = \sqrt{(x_1 - z_1)^2 + (x_2 - z_2)^2}$.
You can see that $$||\mathbf x - z || < \epsilon \implies |x_1 - z_1| < \epsilon$$
(Square both sides, use the fact that squares are non-negative, and then take square root again)
Hence, it follows that $f$ is continuous at $z$. Now, since $z$ was arbitrary, we get that $f$ is continuous on $\mathbb R^2$.
From this, the second part follows easily, since $B = f^{-1} (A)$, where $A$ is open in $\mathbb R$, and $f$ is continuous (on $\mathbb R^2$).