What went wrong? The problems that hosed Yahoo go back a long time, practically to the beginning of the company. They were already very visible when I got there in 1998. Yahoo had two problems Google didn't: easy money, and ambivalence about being a technology company.
People forget that Yahoo was a hand-curated list of links called "Jerry and David's Guide to the World Wide Web". It grew big by being a hand-curated list of links. Then it was big and people were still reliant on a hand-curated list of links. And then it was banner ads and everyone knew who Yahoo was because they had TV ads so people threw money at them.
I know a guy who pitched to Jerry Yang back in the late '90s. He described Jerry as one of the least curious people he'd ever met, and utterly disinterested in technology of any kind.