It wasn't confirmed he beat Kaido. He blocked Kaido from reaching Marineford because he wanted to wipe out the Whitebeard Pirates. Kaido left but that obviously would be sensible because nobody is strong enough to face 2 Yonko back to back. It doesn't mean Shanks was stronger than Kaido. Although I wouldn't be surprised if he were. In fact I think he is. Still Kaido is known as 100 Beast Kaido the strongest thing in the world. That's better than the strongest Man in the world title which Blackbeard tried to claim and Whitebeard had.