Here's a sketch. The details it leaves to be checked are fairly straightforward, I hope.

Let $g:\text{im}(f)\to C$ be the inclusion map.

There is a short exact sequence of complexes $$0\to\ker(f)[-1]\to\text{cone}(f)\to\text{cone}(g)\to0,$$ which gives a long exact sequence of homology.

The natural map $\text{cone}(f)\to\text{cok}(f)$ factors through $\text{cone}(g)$, with the resulting map $\text{cone}(g)\to\text{cok}(f)$ a quasi-isomorphism.