In music theory, the rule is:
the note furthest away from the middle line "wins" and all stems in the triplet go in that direction.