Let $T$ be $T=\{x,\{x\},y \}$ and let $f:A\rightarrow T, \ f(a):=x$, where $A=\{a\}$. Define $B=\{x,y \}$. Now a weird thing happens: We should have that $x \in f(f^{-1}(B))$ by construciton of $f$, but instead we get that $\{x\} \subseteq f(f^{-1}(B))$, althought $\{x\}$ isn't even in the image of $f$!

The argument goes like this:

$x\in B \Rightarrow f^{-1}(x) \subseteq f^{-1}(B) $ by definition. Then $f(f^{-1}(\{x \})) \subseteq f(f^{-1}(B))$. So far, so good. But $$f(f^{-1}(\{x \})) =\{x\} \neq x$$
by definition of the image of a set (the image of a set - even if it contains just one element is also a set - not just the element!), which "proves" the above.

My question are: Hoe to deal with this exotic set ? Should one modifiy the definition of the image to a set with one element to exlude this strange behaviour ? Or is there a better explanation ?

EDIT: I'm terrible sorry for making so many mistakes. I hope I got everything right - but if I didn't, please excuse - it is very tired and I can't focus anymore. I shall correct any mistakes I find tomorrow.