It is instructive to bring to the fore the conceptual key idea that is implicit in Mike's answer.
Hint $ $ by the Lemma $\,\Bbb Z[x]/(x(c\!-\!x))\cong\:\! \Bbb Z\!\times\! \Bbb Z\,$ $\Rightarrow\, \overbrace{x\,a(x)\!+\!(c\!-\!x)\,b(x) = 1}^{\large x,\ c-x\ \ \rm are\ \color{#0a0}{comaximal}^{\phantom{}}}\ \ \smash{\overset{x\,\to\, 0}\Longrightarrow}\ \ \bbox[4px,border:1px solid #0a0]{c\mid 1} $
Idea $ $ proper factorizations of $\,R/f\,$ $\rm\small\color{#f60}{induce}$ coprime $\small\rm\color{#0a0}{(i.e. comaximal)}$ proper
factorizations of $f\,$ by
Lemma $\, $ If $\,\begin{align}f\in R\,\ \rm a\ UFD,\\ {\rm rings}\ G,H\!\neq 0\end{align}\ $ then $\, \begin{align} R/f\,\ &\smash{\overset{\pi_{\phantom{|}}\!}\cong}\,\ G\!\times\! H\\ \color{#f60}{\bf\large \Rightarrow} f\ \ &\!\!=\ g\ h\end{align} $ with $\ \begin{align} &\color{#0a0}{(g)\!+\!(h)=(1)^{\phantom{|^|}}\!\!}\\ &\,(g),\, (h)\neq\:\! (1)\end{align}\,$ for some $\,g,h\in R^{\phantom{|^|}}\!\!\!$
Proof $\ $ Isomorphism $\,\pi\,$ maps the idempotent $\,\varepsilon =(1,0)\in G\!\times\! H\,$ to one $\, \bar e = e\!+\!(f)^{\phantom{|^|}}\!\!\!\,$ in $\,R/f\,$ by $\pi$ maps $(1,0)^{\phantom{|^|}}\!\!\!=\!(1,0)^2$ to $\, \bar e = \bar e^2.\,$ $\,\bar e\,$ is $\,\small\rm\color{#c00}{nontrivial}$: $\,H\!\neq 0\,\Rightarrow\,\varepsilon \neq (0,0),(1,1)^{\phantom{|^|}}\!\!\!\Rightarrow \color{#c00}{\bar e\neq 0,1}$.
Thus by $R^{\phantom{|^{|^{|^|}}}}\!\!\!\!$ a UFD, $\:f^{\phantom{|^|}}\!\!\!\mid (1\!-\!e)e\,\Rightarrow\, f=gh,\,\ g\mid 1\!-\!e,\,\ h\mid e$ $\,\Rightarrow\, (g)^{\phantom{|^|}}\!\!\!+\!(h)\supseteq(1\!-\!e)\!+\!(e)=(1),\:$ and the factorization is proper: $\, g\mid 1^{\phantom{|^|}}\!\! \Rightarrow f\mid h\mid e\,\Rightarrow \color{#c00}{\bar e=0}\,$ and $\,h\mid 1^{\phantom{|^|}}\!\!\Rightarrow f\mid g\mid 1\!-\!e\Rightarrow \color{#c00}{\bar e=1}$.
Remark $\, $ Generally $\small\rm\color{#c00}{nontrivial}$ idempotents (i.e. elements satisfying $\,e^2 = e\,$ and $\,\color{#c00}{e\neq 0,1})\,$ are intimately connected to coprime factorizations (of both elements and rings). In fact some integer factorization algorithms work by searching for nontrivial idempotents mod $\,n,\,$ which immediately yield a factorization of $\,n\,$ (generally we can quickly factor $\,n\,$ given any polynomial which has more roots mod $\,n\,$ than its degree, so any nontrivial idempotent or nontrivial square-root will split $\,n,\,$ since it yields a quadratic with $\,\color{c00}3\,$ roots).
Also closely related: the natural map $\, R\, \to R/I \times R/J\,$ is surjective $\!\iff\! I+J = (1),\,$ e.g. see Prop. $1.10$ in Atiyah and Macdonald's Introduction to Commutative Algebra. This is well known in elementary number theory as the case $\,(a,b)=(1,0)\,$ of the CRT solvability criterion, i.e. $\,x\equiv a\pmod{\!i},\, x\equiv b\pmod{\!j}\,$ is solvable $\!\iff$ $\,\gcd(i,j)\mid a\!-\!b,\,$ i.e. $\,a\!-\!b\in(i)+(j)$.