During most of my professional life I have avoided having to teach. Interestingly, however, I encountered the most fascinating problem during the years that I had to teach. It is the Peerwise Assessment Scoring problem that emerged out of practical necessity during group assignments in class. I would have never thought of this problem if I had not started teaching. This pragmatic research problem is the most fascinating for me during more than 10 years. So you see: it all depends ...
I am sure your question pertains to university, institutes or colleges where there is provision for doing research as well as for teaching. My experience of working in an institute as a professor of chemistry and doing research is that both can be carried out successfully. Both have synergistic effect. However, if facilities for doing research in the thrust areas are not available, with time, interest is lost for research.
I think that there is not a unique answer, because question is lacking several factors, making the difference: for example: the kind of research, the kind of teaching, teacher/research preferences, his/her age, the historical moment when activities are taking place, expected results, the interaction between teaching/learning actors, all before mentioned factors, but applied to mentioned interaction, and so on, almost in the order of an uncountable set of factors, more or less relevant... that's why Relativity theory, String theory, and quantum mechanics are so simple, and Education is so complex...
More challenging? I don't think it is possible because they all require great skills and dedication. Effective teaching depends on effective, constant research in updating one's teaching strategies and teaching resources.
Both Teaching and Research are a challenge, although of a different nature; On the one hand, the ideal is for students to learn actively, that is, for the teacher to be a promoter of student learning and to learn to learn for life and in a meaningful way.
On the other, research is a challenge, both in the training of researchers with creative awareness, and in the generation of new knowledge during the original research process.
It is an obligation of academic teachers to take care, also in a team of lecturers, that students are taught the base lines of the discipline, methods, practical working that they are well-developed and good trained for graduation and their later profession. Some teachers are able to convey this on a high level. Other academic teachers rather have got the ability to inspire students to develop interest in clarifying important questions by research. Of course both is part of the curriculum, but people have their preference, also teachers. I was "educated" by my most influential teacher to appreciate the latter aspect.
Successful teaching and research require passion and engagement at heart. Teaching requires, good knowledge of the subject, good presentation and keeping students engaged and above all being humane to students. Research requires passion about what we do, deep knowledge of the subject and subjects arround, complete engagement and imagination to link known knowledge to its frontiers in order to get new results. Hence they both are not simple activities.
In my opinion & according to my experience, both of them are challenging but teaching is a more "tough" job than research. In a "good" university, chemical research is relatively easy since full support is provided in terms of materials , equipment, and the surrounding environment.
In a British university, I once needed an organic chemical which was more expensive than gold. They brought 10 grams of the chemical within less than a week & I was just asked to take care, which I did. This chemical gave many positive research results in a very short time.
Research - reason being (I see) stability in some fields .I have issues such as overlapping of concepts (interdisciplinary) so I feel I have redundancy on some levels ...