Suppose that in a unital ring $R$, that $e^2=e$, then I want to show that $(e+(1-e)re)$ is an idempotent (that it's square is equal to itself) for any $ r \in R$.
Attempt:
$$(e+(1-r)re)^2=(e+(1-e)re)(e+(1-e)re) =(ee+e(1-e)re+(1-e)ree+(1-e)re(1-e)(re))$$
And now noting that $(e)(1-e)=(e-e^2)=0$,
$$=(e+(1-e)re)$$
Edit: The original problem had a typo, where I tried to show that $e+(1-r)(re)$ was an idempotent, which is false.
It is clear from Henning Makholm's answer, and also the comments, that the assertion that $e + (1 - r)re$ is idempotent, given that $e^2 = e$, is false.
But suppose we look at $e + (1 - e)re$; we have
$(e + (1 - e)re)^2 = (e + (1 - e)re)(e + (1 - e)re)$ $= e^2 + e(1 - e)re + (1 - e)re^2 + (1 - e)re(1 - e)re = e + (1 -e)re! \tag 1$
So $e + (1 - e)re$ is in fact idempotent; we have used
$e^2 = e \tag 2$
in deriving (2), since it is equivalent to
$(1 - e)e = e(1 - e) = e - e^2 = 0. \tag 3$
I think this is a useful result since it allows us to construct potentially many idempotents from $e$. When will
$e + (1 - e)re \ne e? \tag 4$
well, if and only if
$(1 - e)re \ne 0, \tag 5$
which is to say
$re \ne ere; \tag 6$
so if we want to generate new idempotents from old, we need find those $r \in R$ such that (6) binds.