First, let me say I commend you for playing with your daughters that young — I GMed for my daughters, but not at that early age.
From their perspective, if Parent says this is a fantasy game, and I can do what I want, why is Parent not letting me do what I want? Natural sibling rivalry and age-appropriate selfishness may encourage them to value achieving the goals of their character, only.
So, it may be time to introduce the lesson that You Can't Always Get What You Want - at least not everything you want. If at all possible, try to design a scenario where it is explicit that:
- If the PC's refuse to work together, neither gets anything of what they want.
- If the PC's agree to work together, they can each accomplish some of their goals.
- There is no way either one of them can accomplish all of their goals, at least not immediately.
(It might help to read up on iterations of the Prisoner's Dilemma and/or Mediation and Conflict Resolution, such as:
For example, can you engineer a situation where:
The 3-year old gets to free her friend, but only if she joins the pirates for the time being.
The 4-year old gets to join the pirates, but only if she helps her sister free her friend.
If you can devise a way that they can work together and achieve at least some of their own goals and more than they can achieve on their own, you will help them learn to compromise. Of course, it may be that what one or both of them really wants is to frustrate the other one, and that is more important than achieving their own goals. If so, that is important for you to know because this kind of conflict will reoccur.
In terms of how to achieve the above, you know the plot line and details, but here is one idea:
What do the pirates want with the alien — ransom, information, hostage? Whatever it is, have the alien suggest a 'better' target for the pirates to the 3-year old, a target that they can only capture with information that alien has. The alien wants the 3-year old to convince the 4-year old to convince the pirates to go after this other target. (Or; the pirates know about the other target but the alien refuses to tell them about it — the pirates ask the 4-year old to get the 3-year old to get the information from the alien).
The 'price' of this information is that the 4-year old has to promise to help free the alien against the wishes of the pirates (and there may be alien magic or technology to enforce this if you don't think she will keep her word), and the 3-year old has to help the mean pirates capture the new target.
While the pirates would prefer to have both captives, after the dust settles they will actually be better off and prefer to have the new captive rather than the alien, and will promote the 4-year old within the pirate ranking and accept the 3-year old. Both girls can get something they want at the cost of something they don't, but they have to work together to get it.
In response to Please Stop Being Evil's reminder to support my answer, and concern that unachievable goals will bring about existential dread in a 3-year old:
I am a father of two daughters (currently 19 and 16) and stepfather to a son (31 but he was seven when we first met so I did not experience him at 3 and 4). The girls were raised by my wife and me with "attachment parenting". Existential dread is certainly a thing - I believe many of the tantrums of the 'terrible twos' are reactions of distress that accompany the transition from infancy, where a parent can meet all of a child's needs, to toddlerhood, where they cannot. Growing psychological complexity brings the horrific realization to the child that it is not the center of the universe and cannot, in fact, always get what it wants. That is certainly a difficult process. In my, admittedly limited, experience, the worst of that is over by three, and children of three and four can understand things like sharing, taking turns, helping, and empathy, all of which sometimes require setting aside personal goals. Of course, each child is different and there are lots of three and four year olds that are not ready for these things. The OP, or anyone else referencing this question for their own use, knows their children better than we and will need to take that into consideration.
I appreciate your emphasis on temporary vs permanent deferment of goals and have edited my answer to reflect that. Many two year olds would certainly be strongly affected if asked to share their ice cream - that is an ice cream which they will never again be able to eat. Some three year olds, in my experience, are able to console themselves with knowing that perhaps they won't ever be able to eat that particular ice cream again, but that somewhere in the future there is another, different ice cream.
More to the point of the OP's girls, rather than the emotional ability of the children to accept temporary or even permanent deferment of goals, which I believe they may be capable of, is the nature of the emotional contract they have with OP vis a vis "the game". If up until now they have always been able to meet all their goals in the game, and OP is now telling them that they cannot, there certainly is the chance that they will feel betrayal and resentment.