We report on a course in advanced mathematics and didactics aimed at prospective upper secondary teachers, taught jointly by a mathematician and a mathematics educator using a team teaching format. The course is novel in that it covers mathematical and didactical content concurrently and jointly. The present paper focuses on the team teaching aspect, with the aim of investigating what opportunities for learning, in particular for the teachers, arise from such a teaching practice. Drawing on commognitive theory, we analyse a teaching episode that displays how the team teaching might contribute to creating opportunities for meta-level learning, but also how implicit assumptions made by the teachers might create challenges for some students.