Ever since Mayer took the helm at Yahoo, the company has been taking a bit of a turn towards search, and by teaming up with Facebook, it may be able to get itself back into the game full time. A partnership with Facebook could get Yahoo the kind of traffic it needs to work on its algorithm, and Facebook has been expressing interesting in getting into search for a while now.
At the moment, Yahoo relies on Bing, and signed up to do so for a whole ten years, only three of which are up. A search agreement with Facebook would likely put some stress on that deal, quite possibly bringing it to a breaking point. Of course these rumors of an alliance are only that, rumors. And there's no way of telling how far along any actual negotations may be. More here.