A merger may be enough to keep these two going for a while longer.
What worries me about Yahoo is that they've completely lost their engineering edge. Say what you want about their lost battle against Google, but Yahoo were behind a number of great products and their influence can still be felt. Even now, when you look at the products they release they are still a company with incredible knowledge and ability, but it just doesn't seem to be getting used.
A merger with AOL could be worrying, as they they played expertly by Arianna Huffington. For any merger to work AOL would need to give over their properties to the Yahoo brand and for Yahoo's engineering team to get free reign to do what they do best; build great tools and create revenue through innovation.