I don't even know, my guess is that they both worked on the pokedex or something.
Agatha and Professor Oak were once friendly rivals in their youth, and it appears that Agatha may have once had a crush on Oak. However, their relationship has grown bitter and strained over the years because Agatha believes he was too weak to continue competing.
Source