You prove two sets are equal by proving that each is a subset of the other. You prove "A" is a subset of "B" by saying "let [itex]x\in A[/itex]", then show "[itex]x\in B[/itex]".
Here, to show that [itex]f^{-1}(A\cup B)\subset f^{-1}(A)\cup f^{-1}(B)[/itex], start by saying "let [itex]x\in f^{-1}(A\cup B)[/itex]". Then [itex]y= f(x)\in A\cup B[/itex]. And that, in turn, means that either [itex]y\in A[/itex] or [itex]y \in B[/itex]. Consider each of those.
Note, by the way, that we are considering the inverse image of sets. None of this implies or requires that f actually have an "inverse".