Facebook (Nasdaq: FB) COO Sheryl Sandberg didn't waste any time in making Yahoo!'s (Nasdaq: YHOO) new hire feel welcome.

"Congratulations to Marissa Mayer," she posted on Facebook just a couple of hours after Marissa Mayer was tapped as the dot-com pioneer's new leader. "Great news for women (and men!) across Silicon Valley. All of us at Facebook look forward to working with you in your new role."

She then went on to thank interim CEO Ross Levinsohn for helping re-establish the relationship between the two companies.

Online giants don't always take sides publicly, but it's OK for one former Google (Nasdaq: GOOG) executive to congratulate another former Google executive. Big G's two most prolific female executives are now working at Google competitors, and that's interesting.

Facebook's ally has been Microsoft (Nasdaq: MSFT), acquiring an early stake in Mark Zuckerberg's company and stepping up as its first major online advertising partner. Since Yahoo! outsources its search business through Microsoft's Bing, there's nothing fishy about having a Facebook executive respond kindly to Yahoo!'s new leader.

However, isn't it just a matter of time before Facebook and Yahoo! get cozier?

Facebook is now the stickiest site in cyberspace, attracting the majority of its more than 900 million active users on any given day -- and often for long stretches of time. Facebook has to be the biggest threat to the search engines of Google and even partner Microsoft, because you never know when it's going to flip the switch and begin offering its own search platform.

Yahoo!, anyone?

Yahoo! also has the content, marketing relationships, and Asian assets that Facebook lacks. Think about it a bit, and the pieces do come together.

It would also be fitting. Yahoo! once tried to buy Facebook, so it would be poetic justice if Facebook snapped up Yahoo! Nobody's going to think about that now, of course. Mayer is there with fresh ideas to turn Yahoo!'s stagnant top line around. However, over time, don't be surprised if the two companies gravitate to one another as a meandering yet undervalued Yahoo! and a growing yet overvalued Facebook realize that there's something there.

A world of opportunity
Burned by the Facebook IPO? Find out about the recent tech IPO that you should be buying. It's a free read, so what are you waiting for? Check it out now.