Cabin crew works the whole thing.
Cockpit crew deadheads out and they switch in Majuro. (this is the general procedure for all long less than daily flying).
There are rules in the FAR regarding the duty day for pilots that are deadheading - basically, the flight out doesn’t fully count against their duty day. It counts differently whether they are in a “sleeper seat”, a recliner, or economy (basically they are allowed to deadhead further and still stay legal if they are in a more comfortable seat).