There's no possibility Meleys could have outrun Vhagar.
Larger dragons are faster dragons. Period, end of story. We saw this with how incredibly easily Vhagar caught up to Lucerys' little dragon. Plus it's simple biomechanics. Bigger wings, more mass, similar body plan, you're going to be way, way faster. Also potentially stealthier as they'd need to flap far less.
So I think she made the correct initial tactical calculus, which was that she needed to engage and outfight Vhagar and the less experienced Aemond, otherwise she'd just have been caught, and not that far along, either. And she was right. She succeeded in engaging and outfighting Vhagar and Aemond, and crashed them into the ground rather brutally.
Her tactics fell apart when she didn't either use that opportunity to finish them off, and didn't keep track of them, and instead sort of screwed around for a minute before deciding to head home. I'm not entirely sure I buy that she would have made that particular mistake, because she just seems way too savvy for that, but perhaps she was very shaken up by fighting two dragons in a row? Probably never happened to her before.
Also, if she had just gained altitude and then sprinted for Dragonstone, I think Aemond would have been savvy enough that he wouldn't have followed, because he is surely aware that there are a potential THREE other dragons within an hour or three of flying time, and thus who might turn up at any moment.