[proofplan]
Choose a basis of the free module $F$. Since $q: M \to N$ is surjective, each basis vector image $f(e_i)$ has a lift $m_i \in M$. The defining coordinate expansion of a free module then lets us define a unique $R$-[linear map](/page/Linear%20Map) $\tilde f: F \to M$ sending each $e_i$ to $m_i$, and the equality $q \circ \tilde f = f$ follows because the two maps agree on every basis vector.
[/proofplan]
[step:Choose lifts of the images of the basis vectors]
Let $(e_i)_{i \in I}$ be a basis of the free left $R$-module $F$, where $I$ is an indexing set. Let
\begin{align*}
q: M &\to N
\end{align*}
be a surjective $R$-linear map of left $R$-modules, and let
\begin{align*}
f: F &\to N
\end{align*}
be an $R$-linear map.
For each $i \in I$, the element $f(e_i) \in N$ lies in the image of $q$ because $q$ is surjective. Hence choose an element $m_i \in M$ such that
\begin{align*}
q(m_i) = f(e_i).
\end{align*}
[/step]
[step:Define the lifted map by finite coordinate expansion]
By the defining coordinate property of a [free module](/page/Free%20Module) basis, every element $x \in F$ has a unique finite support $S_x \subset I$ and a unique family of nonzero coefficients $(r_i)_{i \in S_x}$ with $r_i \in R$ such that
\begin{align*}
x = \sum_{i \in S_x} r_i e_i.
\end{align*} Define
\begin{align*}
\tilde f: F &\to M \\
x = \sum_{i \in S_x} r_i e_i &\mapsto \sum_{i \in S_x} r_i m_i.
\end{align*}
This map is well-defined because the finite coordinate expansion of $x$ in the basis $(e_i)_{i \in I}$ is unique.
[guided]
The only possible ambiguity in the definition of $\tilde f$ would come from writing the same element $x \in F$ in two different ways as a finite linear combination of basis elements. The defining coordinate property of a [free module](/page/Free%20Module) basis rules this out: for each $x \in F$, there is exactly one finite support $S_x \subset I$ and exactly one family of nonzero coefficients $(r_i)_{i \in S_x}$ with $r_i \in R$ such that
\begin{align*}
x = \sum_{i \in S_x} r_i e_i.
\end{align*}
Therefore the formula
\begin{align*}
\tilde f(x) = \sum_{i \in S_x} r_i m_i
\end{align*}
assigns a single element of $M$ to each $x \in F$. The sum is finite, so it is a legitimate sum in the left $R$-module $M$.
[/guided]
[/step]
[step:Verify that the lifted map is $R$-linear]
Let $x,y \in F$ and let $a,b \in R$. Write their finite basis expansions as
\begin{align*}
x = \sum_{i \in S_x} r_i e_i,
\qquad
y = \sum_{j \in S_y} s_j e_j,
\end{align*}
where $S_x,S_y \subset I$ are finite, $r_i \in R$, and $s_j \in R$. Let $0_R \in R$ denote the additive identity of the ring $R$. After extending missing coefficients by $0_R$ on the finite set $S_x \cup S_y$, the element $ax + by$ has expansion
\begin{align*}
ax + by = \sum_{k \in S_x \cup S_y} (a r_k + b s_k)e_k.
\end{align*}
Thus, by the definition of $\tilde f$,
\begin{align*}
\tilde f(ax + by)
&= \sum_{k \in S_x \cup S_y} (a r_k + b s_k)m_k \\
&= a \sum_{k \in S_x \cup S_y} r_k m_k + b \sum_{k \in S_x \cup S_y} s_k m_k \\
&= a\tilde f(x) + b\tilde f(y).
\end{align*}
Hence $\tilde f: F \to M$ is $R$-linear.
[/step]
[step:Check that the lift composes with $q$ to recover $f$]
Let $x \in F$, and write its finite basis expansion as
\begin{align*}
x = \sum_{i \in S_x} r_i e_i,
\end{align*}
where $S_x \subset I$ is finite and $r_i \in R$. Since $q$ and $f$ are $R$-linear, and since $q(m_i)=f(e_i)$ for every $i \in I$, we have
\begin{align*}
(q \circ \tilde f)(x)
&= q\left(\sum_{i \in S_x} r_i m_i\right) \\
&= \sum_{i \in S_x} r_i q(m_i) \\
&= \sum_{i \in S_x} r_i f(e_i) \\
&= f\left(\sum_{i \in S_x} r_i e_i\right) \\
&= f(x).
\end{align*}
Therefore $q \circ \tilde f = f$ as maps $F \to N$. Since $q$ and $f$ were arbitrary, $F$ satisfies the lifting property for surjective morphisms in $R\operatorname{-Mod}$. Thus $F$ is projective.
[/step]