a) Directly, you can use that a non costant holomorphic mapping is open. This makes imposible the range being real (the real line has emty interior in C!)

b) Using Cauchy Riemann, if f=u+iv, the assumption implies v=0, then and . Hence does not depend neither on nor , and we are done.