Notice that, when considered as f(z) = f(x,y), the assumption is that f(x,y) is holomorphic and .
But your f(x+iy) = λ(x+iy)+c varies with y (unless ).
The thing to prove is that the function must be constant (i.e. it actually is true, but only with ).
You can prove that by a straighforward application of the C-R equations.