Do you mean that $f$ is invertible and $g$ is the inverse of $f$? In this case your proof for forward images obviously goes through.
But in fact, given a map $f:S\to T$, the map that assigns to every set $A\subseteq T$ the set $f^{-1}[A]$ is actually a Boolean homomorphism. I.e., it not only preserves unions (as taking forward images does) but also intersections and complements. The arguments for this are quite simple.
Let me give you the details for unions. Let $A,B\subseteq T$. If $a\in f^{-1}[A]\cup f^{-1}[B]$, then there is $b\in A$ or $b\in B$ such that $f(a)=b$. Hence $a\in f^{-1}[A\cup B]$. If $a\in f^{-1}[A\cup B]$ then there is $b\in A\cup B$ such that $f(a)=b$. So there is $b\in A$ with $f(a)=b$ or there is $b\in B$ such that $f(a)=b$. In other words, $a\in f^{-1}[A]\cup f^{-1}[B]$. This shows $f^{-1}[A\cup B]=f^{-1}[A]\cup f^{-1}[B]$.
Observe that if $f$ happens to be invertible and $g$ is the inverse of $f$, then for all $A\subseteq T$, $f^{-1}[A]=g[A]$. Oh, and don't be confused by my use of square brackets. I use these when I am taking images or preimages of sets rather than points, to avoid confusion. Also note that forward images in general don't preserve intersections.