Let $f\in Hom(R,R')$ be a surjective map and let $I$ be an ideal of $R$
Assume that $Ker(f)\subseteq I$ , prove that $f^{-1}(f(I))=I$
My work ,
$Ker(f)\subseteq I \Rightarrow f^{-1}(\left \{ 0_{R'} \right \})\subseteq I \Rightarrow \left \{ 0_{R'} \right \} \subseteq f(I)\Rightarrow f^{-1}(\left \{ 0_{R'} \right \})\subseteq f^{-1}(f(I))\Rightarrow Ker(f)\subseteq f^{-1}(f(I))$
Here I'm stucked
($R$ and $R'$ are commutative and unitaty rings and $f$ is unital)
One direction is easy: if $f^{-1}(f(I))=I$, then clearly $\ker f\subseteq I$, because $0\in f(I)$. (This is what you attempted, so not really relevant for your problem.)
For the converse direction, note that $I\subseteq f^{-1}(f(I))$ holds regardless of $I$ being an ideal. Thus you just need to prove the converse inclusion.
Suppose $x\in f^{-1}(f(I))$. Then $f(x)\in f(I)$, by definition, so there is $y\in I$ such that $f(x)=f(y)$.
Can you go on? What can you say about $x-y$?