The problem is that $X\setminus A$ need not map to $Y\setminus f[A]$. Consider the map
$$\pi:\Bbb R^2\to\Bbb R:\langle x,y\rangle\mapsto x$$
that projects the plane to the $x$-axis. This map is continuous and open. The set $L=\Bbb R\times\{0\}$ is closed, and $\pi[L]=\Bbb R$, but $\pi[\Bbb R^2\setminus L]=\Bbb R$ as well.
In most applications, topological spaces are assumed to be Hausdorff ($T_2$), i.e. that any two distinct points have disjoint neighbourhoods. This is true among others for metric spaces, like the real numbers, and it immediately implies the $T_1$ condition which says that for any pair of distinct points, each has a neighbourhood not containing the other, which is actually equivalent to saying that any singleton set is closed.
Now, finite unions of closed sets are closed, so if a topological space $X$ is $T_1$, then any finite set is closed. On the other hand, if a space is not $T_1$, then if you take the pair of points witnessing that, i.e. $x,y\in X$ such that for any open $U\ni y$ we have $x\in U$, then the set $\{x\}$ will not be closed, an in fact any set containing $x$ but not containing $y$, finite or not, will not be closed. In particular, any finite set which is not open and does not contain $y$ is neither open nor closed.
For example, any nonempty finite subset of an infinite space with trivial topology is neither open nor closed.
Note that even if a space is not $T_1$, it can still be the case that every finite set is either open or closed, for example if you take $X=\{x,y\}$ with open sets $\emptyset,X,\{x\}$, then $\{y\}$ is closed and all other subsets of $X$ are open.
Best Answer
Consider the projection mapping $f:\Bbb R^2\to \Bbb R$ defined as $f(x_1,x_2)=x_1$. $f $ is continuous and open, but not closed. (Consider the image of the hyperbola $x_1x_2=1$ under $f $.)