Now I should mention that in my theory, before the Golden Age of Piracy, Shanks and Mihawk had the same goal. I don’t mean that both wanted to become the World’s Strongest Swordsman, but rather that I believe young Shanks wanted to surpass Roger.
I believe that at one point Roger gave Shanks the straw hat with the same condition that Shanks later gave to Luffy: ‘Promise that you’ll give it back to me someday when you’ve become a great pirate’.
When Roger died so did both Shanks’ and Mihawk’s hopes of ever truly achieving their purpose in life. That is until they met, because in their rivalry Mihawk thought he had found new purpose. Which is why Mihawk was so rude and dismissive of Shanks pre-timeskip; when Shanks lost his arm Mihawk watched all meaning slip away yet again. Shanks on the other hand probably still wanted to become Pirate King until he truly found new purpose in the new generation and he was willing to bet his arm on it.
Recognizing the true inheritor of Roger’s will in Luffy and giving up his own ambition in order to help him. Something Mihawk wouldn’t understand until years later when Zoro bowed before him asking for his help. That’s when Mihawk, like Shanks, saw the value and meaning in helping others achieve their goals and decided to bet on the next generation as well, to place someone else’s ambition ahead of his own.
In summary, Shanks and Mihawk both wanted to surpass Gol D. Roger but Luffy and Zoro made them realize that their actual purpose was to help the next generation reach their dreams.
*Theory by Bitterbumps