Find the solution of the functional equation $f\colon ℝ\to ℝ\:$
$$f\left(x\right)+a=f\left(x+b\right), \quad\forall x\in\mathbb{R}$$
where $a$ and $b$ are fixed real numbers and $b$ is a positive real number.
I suppose that the answer is $$f\left(x\right)=cx+d+g\left(x\right)$$ for every $x$ real number, where $g\left(x\right)$ is a periodic function. I found by induction that $$f\left(x\right)+ka=f\left(x+kb\right)$$ for every $x$ real number and $k$ integer. However I could not find a complete proof for this. Can somebody help me out?