One can derive $(5)$ by letting $$v(s)=\frac{g(s)-g(y)}{s-y}-g'(y)$$
for $s\neq y$. The problem I have is in letting $s=f(t)$. It is not obvious to me that the expression still holds, particularly because $s-y=f(t)-y$ might equal $0$ and there is no guarantee that the expression is well defined around $y=f(x)$.
