I am working on a homework problem requiring me to show that $Re$ is a projective left $R$-module if $R$ is a ring with identity and $e$ is a fixed element from $R$ such that $e^2=e$.
I know that for any left $R$-modules $A$, $B$ with a given homomorphism $f:Re\to B$ and an epimorphism $g:A\to B$, there exists $h:Re\to A$ such that $g\circ h = f$.
I propose the rule of assignment $h(re)=rg^{-1}(f(e))$, but I have some concerns about whether the function is well defined. I know that $e^2=e$ implies that $e\in Re$, so it makes sense to invoke $f$ on that element, and $g$ being an epimorphism provides some (fixed) preimage to $f(e)$, but is my function value dependent on an intermediate choice of the element $r$? If so, how can I resolve this?
The idea is good. Since $e\in Re$, you can consider $f(e)=y$.
Now, $y=f(e)=f(ee)=ef(e)=ey$.
Suppose $g(x)=y$; such an element exist because $g$ is surjective. Also $g(ex)=eg(x)=ey=y$. Define $$ h\colon Re\to A, \qquad h(t)=tx $$ and prove this is a well defined map with the desired properties.
The step about $h$ being well defined is necessary: an element of $Re$ can, in general, be written in different ways.