Q:

Prob. 9 (c), Sec. 18 in Munkres' TOPOLOGY, 2nd ed: Continuity of a map deduced from its restrictions to closed subsets of the domain

Here's Prob. 9, Sec. 18 in Topology by James R. Munkres, 2nd edition: 

Let $\{ A_\alpha \}$ be a collection of subsets of $X$; let $X = \bigcup_\alpha A_\alpha$. Let $f \colon X \to Y$: suppose that $f | A_\alpha$ is continuous for each $\alpha$. 
(a) Show that if the collection $\{A_\alpha \}$ is finite and each set $A_\alpha$ is closed, then $f$ is continuous. [ I have managed to show this! ]
(b) Find an example where the collection $\{ A_\alpha \}$ is countable and each $A_\alpha$is closed, but $f$ is not continuous. [Example found easily!]
(c) An indexed family of sets $\{ A_\alpha \}$ is said to be locally finite if each point $x$ of $X$ has a nieghborhood that intersects $A_\alpha$ for only finitely many values of $\alpha$. Show that if the family $\{ A_\alpha \}$ is locally finite and each $A_\alpha$ is closed, then $f$ is continuous. 

It is part (c) that stumps me. 
My Attempt at Part (c): 

Let $B$ be a closed set in $Y$. We need to show that $f^{-} (B)$ is closed in $X$. Let $A \colon= f^{-1}(B)$. Then 
  $$A = \bigcup_\alpha \left( f | A_\alpha \right)^{-1} (B).$$
  Now since $f | A_\alpha$ is continuous for each $\alpha$, each set $\left( f | A_\alpha \right)^{-1} (B)$ is closed in $A_\alpha$ and hence is closed in $X$. 
Suppose that $x \in X - A$. Then $x$ has a neighborhood $U$ (i.e. an open set $U$ containing $x$) that intersects only finitely many of the sets in the collection $\{A_\alpha \}$. Let $\alpha_1, \ldots, \alpha_n$ be the values of the indices $\alpha$ for which $U$ intersects the sets $A_\alpha$. 
Since $x \not\in A$, therefore $x \not\in \left( f | A_\alpha \right)^{-1} (B)$ for any $\alpha$. So $\left( f|A_\alpha \right) (x) \not\in B$ for any $\alpha$. 
But as $X = \bigcup_\alpha A_\alpha$, so $x \in A_\alpha$ for some $\alpha$, and so $f(x) = \left( f|A_\alpha \right) (x) $ for some $\alpha$. But $x$ can only belong to one of the sets $A_{\alpha_1}, \ldots, A_{\alpha_n}$. So $f(x) = \left( f | A_{\alpha_i} \right) (x)$ for some $i \in \{ i , \ldots, n\}$. 
Thus we can conclude that $f(x) \not\in B$. 
Let $S_i \colon= \left( f | A_{\alpha_i} \right)^{-1} (B)$. Then $x \not\in S_i$ for any $i$. Since the sets $\left( f | A_{\alpha_i} \right)^{-1} (B)$ are closed in $X$, we can conclude that, for each $i$, the point $x$ has a neighborhood $U_i$ such that $U_i \cap S_i = \emptyset$. 
Let $V \colon= U \cap U_1 \cap \ldots \cap U_n$. Then $V$ is a neighborhood of $x$ and if $v \in V$, then $v \in U$ so that $v \in A_{\alpha_i}$ only for some $i = 1, \ldots, n$ and $v \in U_i$ so that $v \not\in S_i$ for any $i = 1, \ldots, n$. 
Also then $v \not\in A_\alpha$ for any $\alpha \neq \alpha_1, \ldots, \alpha_n$. 

Is my reasoning so far correct? How to show from here  that $v \not\in A$? 
P.S.: 
My Attempt at Part (c) Contd.: 

Now if this $v$ were to lie in $A$, then $v$ would have to lie in some set $\left( f | A_\alpha \right)^{-1}(B)$ for some $\alpha$. But as each set $\left( f | A_\alpha \right)^{-1}(B)$ is contained in $A_\alpha$ and as $v$ cannot be in any set $A_\alpha$ for any $\alpha$ different from one of the $\alpha_i$, so we can conclude that if $v$ were to lie in $A$, then $v$ would have to be in one of the sets $\left( f | A_{\alpha_i} \right)^{-1}(B) = S_i$ for some $i = 1, \ldots, n$. But as $v$ is in $U_i$ and $U_i \cap S_i = \emptyset$ for each $i$, so $v$ cannot be in $S_i$ for any $i$. Thus $v$ cannot be in $A$, which implies that $v \in X-A$, showing that the open set $U \cap U_1 \cap \cdots \cap U_n \subset X-A$. And $x \in U \cap U_1 \cap \cdots \cap U_n$ also. 
Thus every point $x \in X-A$ has a neighborhood disjoint from $A$, which implies that set $X-A$ is open and hence $A$ is closed, as required. 

Is my proof correct now? Or, is there any problem in it?

A:

I think easier approach would be to look at continuity at a point.
Let $x \in X$ and take a neighbourhood $U$ of $x$ such that $U$ intersects only finite amount of the sets $A_\alpha$. Now consider $U$ as a topological space and show that the function $g: U \to Y$, $g(x) = f(x)$, is continuous (use the result from (a)).
Now for each $x \in X$ there exists a neighbourhood $U_x$ such that the restriction of $f$ to $U_x$ is continuous. This means that for each neighbourhood $V$ of $f(x) \in Y$ there exists a neighbourhood $W \subset U_x$ of $x$ in the topological space $U_x$ such that $f(W) \subset V$. But since $U_x$ is open in $X$ and $W$ is open in $U_x$, $W$ is open in $X$ too. Thus $f$ is continuous at $x$ in the topological space $X$.

