EDIT
This might be a more clear problem statement:
We have an arbitrary topological space $Y$ and an non-open set $B$ in $Y$. How to find a topological space $X$ and a continuous map $F:X\rightarrow Y$ such that $F^{-1}(B)$ in not open in X?
We have an arbitrary topological space $Y$ and an non-open set $B$ in $Y$. But now an arbitrary topological space $X$ is given, such that there exists a continuous map $F:X\rightarrow Y$. How to construct a continuous map $G$ such that $G^{-1}(B)$ is not open in $X$?
Original questions
We have two topological spaces $X$ and $Y$.
If $B$ is not open in $Y$, is there a continuous map $F:X \rightarrow Y$ such that $F^{-1}(B)$ is not open in $X$? How to construct such a map?
Equivelently, if for $\forall$ continuous function $F:X\rightarrow Y$ we have that $F^{-1}(B)$ is open in $X$, is $B$ open in $Y$? Can you give a counter example?