Yes, it's legal.
IMHO no way can it be considered safe. There are all sorts of problems with CRM issues with Captains not liking to be seen to pull another up on their modus operandi at one extreme, or with nitpicking at the other, with negative authority gradients, with lack of familiarity with the RH seat, etc. etc.
I believe the CAA turns a blind eye to it happening to cover a temporary shortage of FO's, but it should not be planned or accepted as a long-term proposition without some planning for rectification.