Q:

Show $f(w)=\frac{1}{2\pi i}\int_{\partial \Omega} f(z)\frac{g'(z)}{g(z)-g(w)}\,dz$ for $w\in\Omega$

Let $f, \Omega$ be as in Cauchy's formula (i.e. $\Omega\subset\mathbb{C}$ is bounded, open, $\partial\Omega=\amalg (\text{rectifiable Jordan curves})$, $f$ is holomorphic on an open set $\supset \overline{\Omega}$), $g$ holomorphic on open $\supset \overline{\Omega}$, injective. Show for $w\in\Omega$
$$f(w)=\dfrac{1}{2\pi i}\int_{\partial \Omega} f(z)\dfrac{g'(z)}{g(z)-g(w)}\,dz.$$ Also show when $g(z)=z$, we get the result as stated in Cauchy's representation formula $\left(\text{i.e. } f(w)=\dfrac{1}{2\pi i}\int_{\partial \Omega} \dfrac{f(z)}{z-w}\,dz \right)$.
Proof: Recall Cauchy's representation formula 
\begin{equation*}
\begin{aligned}
f(w) & =\dfrac{1}{2\pi i}\int_{\partial \Omega} \dfrac{f(z)}{z-w}\,dz \\
& =\dfrac{1}{2\pi i}\int_{\partial \Omega} \dfrac{f(z)}{z-w}\cdot \dfrac{g(z)-g(w)}{g(z)-g(w)}\,dz \\
& =\dfrac{1}{2\pi i}\int_{\partial \Omega} f(z) \cdot \dfrac{g(z)-g(w)}{z-w} \cdot \dfrac{1}{g(z)-g(w)}\,dz \\
& =\dfrac{1}{2\pi i}\int_{\partial \Omega} f(z) \cdot \dfrac{g'(w)}{g(z)-g(w)}\,dz 
\end{aligned}
\end{equation*}
I know that I lept from the third line to the fourth but I know there is some immediate steps. Note I am not allow to use anything about residues.
EDIT: Steps between lines 3 and 4 of the equation above.
Note that we can expand $g(z)$ in its Taylor series around $z=w$ $$\dfrac{g(z)-g(w)}{z-w}=\dfrac{g'(w)(z-w)+\sum\limits_{n=2}^\infty g^{(n)}(w)(z-w)^n}{z-w}$$
Thus,
\begin{equation*}
\begin{aligned}
f(w) 
& =\dfrac{1}{2\pi i}\int_{\partial \Omega} f(z) \cdot \dfrac{g'(w)(z-w)}{z-w} \cdot \dfrac{1}{g(z)-g(w)}\,dz 
+ \dfrac{1}{2\pi i}\int_{\partial \Omega} f(z) \cdot \dfrac{\sum\limits_{n=2}^\infty g^{(n)}(w)(z-w)^n}{z-w} \cdot \dfrac{1}{g(z)-g(w)}\,dz \\
& =\dfrac{1}{2\pi i}\int_{\partial \Omega} f(z) \cdot \dfrac{g'(w)}{g(z)-g(w)}\,dz 
+ \dfrac{1}{2\pi i}\int_{\partial \Omega} f(z) \cdot \sum\limits_{n=2}^\infty g^{(n)}(w)(z-w)^{n-1} \cdot \dfrac{1}{g(z)-g(w)}\,dz \\
& =\dfrac{1}{2\pi i}\int_{\partial \Omega} f(z) \cdot \dfrac{g'(w)}{g(z)-g(w)}\,dz 
+ \dfrac{1}{2\pi i}\sum\limits_{n=2}^\infty g^{(n)}(w)\int_{\partial \Omega} f(z) \cdot (z-w)^{n-1} \cdot \dfrac{1}{g(z)-g(w)}\,dz \\
\end{aligned}
\end{equation*}

A:

For fixed $w\in\Omega$ the function
$$h(z):={f(z)g'(z)\over g(z)-g(w)}$$
is analytic in $\overline{\Omega}$, apart from an isolated singularity at $w$, because $g$ is assumed injective. In addition this singularity is a simple pole. We then  can write $g(z)-g(w)=(z-w)g_1(z)$ with $g_1$ analytic in a neighborhood of $w$ and $g_1(w)=g'(w)\ne0$. It follows that
$${1\over2\pi i}\int_{\partial\Omega}{f(z)g'(z)\over g(z)-g(w)}={1\over2\pi i}\int_{\partial\Omega}{f(z)g'(z)\over g_1(z)}{dz\over z-w}=f(w)\ ,$$
using standard rules of residue calculus.

