The following question is from my exercise sheet in Commutative Algebra and I am not making any sufficient progress on it.
Question: Let $A$ be a ring and let $I$ be a finitely generated two-sided ideal of $A$ such that $I^2 =I$. Show that there exists a central element $e\in A$ such that $e=e^2$ and $I=eA= Ae$.
Using Nakayma Lemma I got that there exists an $r\in A$ such that $rI=0$ and $r= 1+ aI$. But I am not able to show the existence of such an element $e=e^2$ and I.
Can you please help me with this by giving some hints?