If $(x_{\lambda})$ is an ultranet in X and $f:X\rightarrow Y$ then $(f(x_{\lambda}))$ is an ultranet in Y.
Proof: If $A\subset Y$,then $f^{-1}(A)=X-f^{-1}(Y-A),$so ($x_{\lambda}$) is eventually in either $f^{-1}(A)$ or $f^{-1}(Y-A),$ from which it follows that $(f(x_{\lambda}))$ is eventually in either A or $Y-A.$Thus $(f(x_{\lambda}))$ is an ultranet.
The above proof is given in Willard's topolgy.I'm not getting the how to prove
"If $A\subset Y$,then $f^{-1}(A)=X-f^{-1}(Y-A)$"
$f^{-1}(A) = X - f^{-1}(Y-A)$ Proof:
$X = f^{-1}(Y) = f^{-1}(A \cup A^{c}) = f^{-1}(A) \cup f^{-1}(A^{c})$ (disjoint union)
So $(f^{-1}(A^{c}))^{c} = f^{-1}(A)$
And $X - f^{-1}(Y - A) = X - f^{-1}(A^{c}) = (f^{-1}(A^{c}))^{c} = f^{-1}(A)$