Folland Real Analysis Chapter 4 Exercise 15 I'm studying for a test (and prelims) and have been working through Folland. I've been a bit stuck on the following problem. $\overline{A}$ denotes the closure of $A$, $A^o$ the interior, and $g\in C(A)$ means $g$ is continuous on $A$.
If $X$ is a topological space, $A\subset X$ is closed, and $g\in C(A)$ satisfies $g=0$ on $\overline{A}\setminus A^o$, then the extension of $g$ to $X$ defined by $g(x)=0$ for $x\in A^c$ is continuous.
I know that if $A$ is closed then $A^c$ is open, and that $\overline{A}=A$. Also, $(\overline{A}\setminus A^o)^c=A^o\cup A^c$. To show that $g$ is continuous on $A^c$, I need to show for any neighborhood $V$ of $g(x)$ that $g^{-1}(V)$ is a neighborhood of $x$.
I know I should start with an arbitrary $x\in A^c$ and an arbitrary neighborhood $V$ of $g(x)$, however I am not sure how to proceed. Any ideas?

For $x\in A^\circ$, pick $V$ to be an open neighbor of $g(x)$. Then by continuity of $g$, we can find $U\subset A$ open in $A$ such that $g(U)\subset V$. Then $x\in U\cap A^\circ$ with $g(U\cap A^\circ)\subset V$ where $U\cap A^\circ$ is open in $X$.
For $x\in A-A^\circ$, we have $g(x)=0$. Let $V$ be an open neighbor of $g(x)=0$, by continuity of $g$ on $A$, we can find $U\subset X$ open in $X$ such that $g(U\cap A)\subset V$ and $x\in U\cap A$. Note that $g(U\cap A^c)=\{0\}\subset V$, then we have $g(U)\subset V$ where $x\in U$ and $U$ is open in $X$. 
The case for $x\in A^\circ$ is given in the previous answer. 
