Complement of a set and inverse image.
We need the
Definition of $f^{-1}(C)$:
$$f^{-1}(C)=\{x\in E|\ f(x)\in C\}.$$
Then we just compute both sides and compare.
On one hand, $$f^{-1}(A^c)=\{x\in E| f(x)\in A^c\}=\{x\in E| f(x)\in \mathbb{R}\setminus A\}$$
On the other hand, $$E\setminus f^{-1}(A)=E\setminus \{x\in E| f(x)\in A\}=\{x\in E| f(x)\in \mathbb{R}\setminus A\}$$