This is a usual how to write a thank you letter but the twist is during the application process I put down professor X as a possible supervisor. I then interviewed with professor X and professor Y (both at the same institution). I was later accepted and the letter stated the supervisor would be professor Y. (Speculation: maybe professor X could not/did not want to take me on for whatever reason but professor Y did.) I spent a few days looking into professor Y's research and would probably accept.
How do I go about replying to the offer and emailing both professors? I'm not sure how to navigate this situation with the expected tact. Any guidance would be appreciated.
Context: this is for a PhD at a UK/European university.