If $f:X \to Y$ is a function between a metric space baire $X$ and a metric separable space $Y$ and if for each open $U$ of $Y$, $f^{-1}(U)$ is countable union of closed sets of $X$, then there exists a dense $G_{\delta}$ in $X$ such that $f$ is continuous.
My objective: Suppose that $Z$ is the set $G_{\delta}$, then there exists a family of dense openings $\{W_i : i \in \mathbb{N}\}$ of $X$ such that $Z= \cap_{i \in \mathbb{N}} W_i$, also, as for each open $U$ of $Y$ we have to $f^{-1}(U)= \cup_{i \in \mathbb{N}}B_i$ where $B_i$ es closed in $X$, i.e, $f^{-1}(U)$ is $F_\sigma$, and since $Y$ is separable, then $Y$ has a dense subset. My idea is to use the separability of $Y$ to build my $G_ {\delta}$, but I don't know how to do it. How could I use it? or any other ideas for this test? please thank you very much.