Claim : $A:=\{ (x,y)\in \mathbb R \mid xy=1 \}$ is closed in $\mathbb R^2.$
Hint is given, but I cannot finish.
Hint
Let $(a,b)\in A^c$. Then $ab\neq 1$, and WLOG : $ab>1.$ We can pick $q\in \mathbb Q$ s.t. $ab-1>q>0$ from the density of rational numbers, and then $B((a,b), \tfrac{q}{2})\subset A^c$. Thus $A$ is closed.
I cannot see why $B((a,b), \tfrac{q}{2})\subset A^c$.
For arbitrary $(c,d)\in B((a,b), \tfrac{q}{2})$, $\|(a,b)-(c,d)\|<\tfrac{q}{2}<\tfrac{ab-1}{2}$ holds and in order to show $(c,d)\in A^c$, suppose $cd=1.$
Then, $d=\frac{1}{c}$ and I have $$\frac{ab-1}{2}>\|(a,b)-(c,\tfrac{1}{c})\|=\sqrt{(a-c)^2+(b-\tfrac{1}{c})^2}.$$
I didn't lead contradiction from here yet.
Thanks for any help.
As written, the hint won't work. Consider $(a,b)=(2000,0.001)$ with $ab=2>1$. Following the hint, we may pick $q=\frac12$, but $B((a,b),\frac12)$ intersects $A$ as it even intersects the $x$-axis below $A$.
So either improve the idea behind the hint or try something completely different (cf. comments). In fact, it already makes no sense that the hint author references the density of $\Bbb Q$ in $\Bbb R$