Let $a \in f[X-f[X]]$.
Then, there exists $b \in X-f[X]$ such that $f(b)=a$.
Since $b \notin f[X]$, we know that there does not exist $c \in X$ such that $f(c)=b$.
We now show that $a \notin f[f[X]]$. Assume the contrary, and let $f(m)=a$ where $m \in f[X]$. Since $f$ is injective, we obtain $m=b$. Since $m \in f[X]$, there exists $n$ such that $f(n)=m$, i.e. $f(n)=b$, which is a contradiction to the last paragraph.
Therefore, $a \in f[X]-f[f[X]]$.
Let $a \in f[X]-f[f[X]]$, i.e. $a \in f[X]$ and $a \notin f[f[X]]$.
Let $b \in X$ satisfy $f(b)=a$.
We now show that $b \notin f[X]$. Assume the contrary, and let $f(c)=b$. Then, $f(f(c))=f(b)=a$, contradicting $a \notin f[f[X]]$.
Therefore, $a \in f[X-f[X]]$.
We have shown that $a \in f[X-f[X]] \implies a \in f[X]-f[f[X]]$ and $a \in f[X]-f[f[X]] \implies a \in f[X-f[X]]$, so we conclude with $a \in f[X-f[X]] \iff a \in f[X]-f[f[X]]$, whence $f[X-f[X]] = f[X]-f[f[X]]$ by the axiom of extension.