This is just substitution.
(2) is the statement
$f(z+k)=f(z)+k(w(k)+f'(z))$;
think of this as saying that $w$ measures the error in approximating the change in $f$ (over a large region) by $f'$ (which is a purely local thing). The initial value is $z$; remember that$f(z)+kf'(z)$ is a good approximation to $f(z+k)$ if $z+k$ is near $z$, that is, if $k$ is near $0$. Meanwhile, the bigger $k$ gets, the larger the region we're looking at (going from $z$ to $z+k$), and the larger potential error. Intuitively, you often want to think of $w$ as increasing - the further away from $z$ you get, the worse this approximation becomes - although this won't always be the case: a stopped clock is right twice a day, and $\sin(10+17129384798324\pi)=\sin(10)$.
Now we're interested in a specific initial value, and a specific change; so we're going to replace $z$ and $k$ with these expressions. Specifically, we're interested in $k=h(v(h)+u'(x))$, and $z=u(x)$. We get $$f(u(x)+h(v(h)+u'(x)))=f(z+k)=f(z)+k(w(k)+f'(z))$$ $$=f(u(x))+(h(v(h)+u'(x)))(w(k)+f'(u(x))).$$Now subtract a $f(u(x))$ from both sides of $$f(u(x)+h(v(h)+u'(x)))=f(u(x))+(h(v(h)+u'(x)))(w(k)+f'(u(x)))$$ and you get from the first line to the second.