In Revenge of the Sith Yoda and Obi Wan should have both gone to fight Anakin, and then both come back to fight Palpatine together.
It was a mistake to split up and take on such powerful enemies alone.