How would I prove that this function is affine if $f(x+h)-f(x)=hf'(x)$?

The given equation $f(x+h)−f(x)=hf′(x)$ holds for all real $h, x$, so we can safely set $x=0$. This gives $$f(h)-f(0)=hf'(0)\iff f(h)=f'(0)\cdot h+f(0).$$ Letting $h=x,f'(0)=k,f(0)=n$, we have $f(x)=kx+n$ as desired. $\blacksquare$


Differentiate with respect to $h$. You get

$$f'(x+h)=f'(x)$$ for every $h$ and $x$, therefore the derivative is constant.