How to answer a supervisor's email that includes and presents another professor to you? What do you do when professor A wants to present professor B to you and does that by including professor B in the same email with the formula "I have copied him/her into this email so you can make contact with him/her directly"?

I'm a little uncertain if I should answer separately to thank professor A and to present myself to professor B, or if I should answer with the same email to both. If the latter, what is the best approach to use?
It depends on what that new contact is for.

If it is for something completely unrelated to anything that you are working with professor A, then I'd suggest replying to both with a thank you message and then separately contacting Prof B.

If, instead, the work is, even sidely related to whatever you are doing with Prof A, add everyone in your emails. Transparent communication is key in any healthy relationship. If you are worried about spamming Prof A with relatively non-related content you can always contact Prof A separately and directly ask him if he/she wants to keep being CC'd in the email chain, there is no problem with that.

These Profs, they are just people, treat them like people!. Don't overthink it, as StrongBad says.