(I assume it is OK to post a full solution to what was long ago probably a homework question.)
Let me provide a complete (but perhaps overly long-winded) proof which does not use separate $\Rightarrow$ and $\Leftarrow$ parts, but only equivalences.
The most complex part seems to be $f[S]^c \subseteq f[S^c]$, so let's try to simplify that: for any $S \subseteq A$,
$$
\begin{align}
& f[S]^c \subseteq f[S^c] \\
\equiv & \;\;\;\;\;\text{"definition of $\subseteq$"} \\
& \langle \forall y :: y \in f[S]^c \Rightarrow y \in f[S^c] \rangle \\
\equiv & \;\;\;\;\;\text{"definition of $^c$, which means $B$-complement here"} \\
& \langle \forall y :: y \in B \land y \not\in f[S] \Rightarrow y \in f[S^c] \rangle \\
\equiv & \;\;\;\;\;\text{"logic: rearrange to bring both occurrences of $f[\cdot]$ together"} \\
& \langle \forall y :: y \in B \Rightarrow y \in f[S] \lor y \in f[S^c] \rangle \\
\equiv & \;\;\;\;\;\text{"definition of $\cup$ -- since we know distribution properties of $\cdot[\cdot]$"} \\
& \langle \forall y :: y \in B \Rightarrow y \in f[S] \cup f[S^c] \rangle \\
(*) \; \equiv & \;\;\;\;\;\text{"$f[\cdot]$ distributes over $\cup$"} \\
& \langle \forall y :: y \in B \Rightarrow y \in f[S \cup S^c] \rangle \\
\equiv & \;\;\;\;\;\text{"set theory: basic property of $^c$, which here means $A$-complement"} \\
& \langle \forall y :: y \in B \Rightarrow y \in f[A] \rangle \\
\equiv & \;\;\;\;\;\text{"definition of $\subseteq$"} \\
& B \subseteq f[A] \\
\equiv & \;\;\;\;\;\text{"using $f[S] \subseteq B$ for any $S$, since the range of $f$ is $B$"} \\
& B = f[A] \\
\equiv & \;\;\;\;\;\text{"one of the definitions of surjectivity, using $f : A \to B$"} \\
& f \textrm{ is surjective} \\
\end{align}
$$
Now formally wrapping up, we have
$$
\begin{align}
& \langle \forall S :: f[S]^c \subseteq f[S^c] \rangle \\
\equiv & \;\;\;\;\;\text{"by the above calculation"} \\
& \langle \forall S :: f \textrm{ is surjective} \rangle \\
\equiv & \;\;\;\;\;\text{"logic: simplify: $S$ does not occur inside $\forall S$"} \\
& f \textrm{ is surjective} \\
\end{align}
$$
which proves the statement in question.
The key step was $(*)$, and this is the most 'creative' part in an otherwise fairly mechanical proof, provided one is familiar with logic and the definitions and basic properties of set theory and functions.