Solution 1:

It's almost correct, but be more precise. The key observation is (for all $C \subseteq Y$ and all $F \subseteq X$).

$$(f\restriction_F)^{-1}[C] = f^{-1}[C] \cap F\tag{1}$$

which makes a simple connection between inverse images of the restricted map and those of $f$ and intersections with their domains. This is standard elementary set-theory.

So if $C \subseteq Y$ is closed and $f$ is continuous as a map from $X_w$, continuity of $f$ says that $f^{-1}[C]$ is closed in $X_w$, and $(1)$ read from left to right says that all restrictions of $f$ to $F \in \mathcal{F}$ indeed have a closed in $F$ inverse image of $C$, as $f^{-1}[C]\cap F$ is closed in $F$ by definition of $X_w$. So all $f\restriction_F$ are continuous by the closed-inverse image property.

OTOH if all restrictions are continuous and $C \subseteq Y$ is closed then $f^{-1}[C]$ is $X_w$ closed because $(1)$ tells us that any intersection with an $F \in \mathcal{F}$ is just the inverse image of $C$ of the restricted $f$ which is assumed to be closed by the continuity of $f\restriction_F$. So $f: X_w \to Y$ is continuous.