Let $f: \mathbb{R}\rightarrow \mathbb{R}$ an arbitrary function and $g: \mathbb{R}\rightarrow \mathbb{R} $ a quadratic function with the following property:
For any $m$ and $n$ the equation $f(x)=mx+n$ has a solution iff the equation $g(x)=mx+n$ has a solution.
Prove that $f$ and $g$ are equal.
I proved that the range for both are equal, but no idea of proving the complete statement
The sketch:
WLOG let $g$ curves up.
Therefore $f(x_0) = g(x_0)$. Since the choice of $x_0$ is arbitrary, $f=g$.