Yeah, had this a few times. Potentially, it is a time for you to shine and demonstrate how you can gently take over and produce a good outcome with a below par colleague - from either seat.
What annoys me is when things get to the point where they drag you down and you get a poor mark because you were distracted or confused by their lack of ability.
I was absolutely astounded some years ago when a supposed long-haul Captain was completely at sea - he didn't even know how to programme a hold!!! I couldn't believe how bad he was but I was more annoyed with myself because I should have stepped up and demonstrated my own command ability, but I was so surprised that this retard had somehow got through a command course but was clearly not capable, that I let the situation get to me.
Maybe he was in with the TRE and they were testing me. Had it been for real, over the Ocean, I would have just taken control - I have had to shout at a couple of fellow pilots over the years, and I am not a shouty person. But in the SIM you try not to embarrass the other guy when he is making a Horlicks of things.
I don't know what to suggest but I wish now that I had asked to speak with the TRE privately afterwards and voice my concerns about pilot X.