I am trying to show that $f(x)\in F[x]$ is irreducible and $char F=p$ then $f(x)=g(x^{p^e})$ for $g(x)$ irreducible and separable.
I am working with the substitution map $\phi: F[x]\to F[x]$ which sends $x\to x^{p^e}$ and showed it is injective and a homomorphism. So we can consider the image of the polynomial $f(x)$ under this map and hence can rewrite $f(x)$ as a polynomial in $x^{p^e}$. But why does this image have to be irreducible?
Your approach doest not make much sense. $x \mapsto x^{p^e}$ is not surjective for $e \geq 1$. What you do is the following: You choose the maximal $e \geq 0$, such that $f$ lies in the image of $x \mapsto x^{p^e}$ (You should proof that such a maximal $e$ exists). Then you can write $f(x) = g(x^{p^e})$ by construction of $e$.
It is a straightforward verification that $f$ factors into two polynomials of positive degree, if $g$ does. So $g$ has to be irreducible.
You are left to show that $g$ is separable. Use that we we cannot write $g(x)=h(x^p)$ for any $h$ by the construction of $e$.