I'm not familiar with D&D so this will be a system agnostic answer.
What you could do is provide an in-game explanation as to why the character of the youngest daughter sometimes disappears from the game or does strange things. Give her a character with a chaotic neutral allignment and take over some of the narrative aspects of the game for her.
She could even play a pet (maybe she would like being a big cat?) that's not very loyal and tends to runs off on a whim if she hears a mouse rustling somewhere.
Your youngest will be happy to be included as long as her attention span allows her and the older one will get amusement out of your explanations for the little one's actions.
It would of course be ideal if you could just keep both of their attentions as long as possible, but in my experience nothing is guaranteed to hold a 4 year old's attention for an extended period of time.
Make a GMPC that cannot help
Good examples of this are for example golems, zombies, or animal companions. You can ask them for help all you want; they cannot make decisions for themselves and only follow orders. They might instinctively fight on their own accord, protect their charge with their lives and follow him anywhere but no matter how often you try, they won't be able to pick whether you should go rescue the princess immediately or find the magic sword first.
Make a GMPC that is not allowed to help
Perhaps the companion is tasked by a Holy Order to escort the PC, because according to a prophecy the PC will recover an ancient artifact. But the prophecy also says that the PC will travel there on their own accord and their minds cannot be influenced by those who know the contents of the prophecy. So the companion will guard and help the PC with anything they ask, but they cannot influence their decisions directly for fear of ruining the prophecy.
Alternatively, the companion could just have a very strong belief that the PC should be solving this problem on their own. They could be a mentor from a monastic order teaching them about decisions and responsibilities, for example. Or a military leader training an officer to deal with complex situations.
Make a GMPC diametrically opposed to going forward
For example, a bodyguard who is under strict orders to follow the PC wherever they go and never go against their command, but who really just wants the PC to go back home and give up this foolishness. They will never say so, but if you ask, their only advice is "turn around and march home", which is not exactly helpful.
Make a GMPC that cannot communicate with the PC
A mute, for example. It would take quite some adventuring before the PC can learn sign language to the point where the companion can do much more then point at things and do some gestures. This one can give some help, but as long as you as the DM don't talk it's very easy to stay in character and you probably won't be able to give away much. (It's also funny to have to do charades)
Best Answer
The Rules as Written are based on the official rule books: the Dungeon Masters Guide, the Monster Manual, and the Players Handbook. The Starter Set is, as you noted, an incomplete presentation of those core rules, as are the Basic Rules (and the SRD) that are freely available on-line. If there is a conflict between them, the core rules (MM, DMG, PHB) will generally take precedence1.
To get the most out of a RAW reference, the official errata as posted by WoTC on their web page is directed at the Players Handbook, the Dungeon Masters Guide, and the Monster Manual. Official errata, because it corrects and updates the core rule books, need to be accounted for during a RAW discussion. Any reference to a rule that does not take into account the errata will be incomplete. (And quite possibly wrong). A more recent printing (which usually includes errata from a previous release) will typically take precedence over one lacking that update/correction. (@Sh4dowPlyr, thanks for making that point).
Whether or not the Sage Advice compendium meets "rules as written" isn't as clear, since within Sage Advice WoTC points out the three levels of rules: Rules as Written, Rules as Intended, and Rules as Fun. I've noticed that most folks treat it as within RAW, but some folks on the GITP forums (for example) spell out why they don't.
As a caveat, for Adventure League play it is important to check for that season's rules treatment, since certain published material either is or isn't eligible for AL play. A RAW issue in AL must account for a given season's boundaries and limitations. This may include official published material like Princes of the Apocalypse/Elemental Evil, The Curse of Strahd, Sword Coast Adventure Guide, and other officially published material. Draft rules and play test like "Unearthed Arcana" are admitted by WoTC to not be in finished form and as such are least likely to be acceptable as a basis for RAW.
1 At a given table it is similar to the AL case: it is common to see some optional rules included or not included based on a DM's decision. For example, in my first 5e campaign the Variant Human rules, and Feats, were closed down by the DM for character creation. (No feats until 4th level). That was RAW for us, as were selected spells from the published Elemental Evil material from WoTC. In our second campaign, the optional DMG rules for facing/flanking/being surrounded were included. This was made explicitly clear by the DM in both cases and, being published rules, were there for reference in published material in case questions/conflicts came up.