Character A and Character B are Hogwarts students—most likely the same years and either sex—who are both super smart and have been trying to prove themselves as the smartest since they arrived at Hogwarts. They're forced to face years of hatred when they're assigned to work together on a heavily-weighted class assignment, and promptly deal the soul-crushing realization that they don't hate each other as much as they thought they did.
(Alternatively, they both work together at the Ministry after years of hatred at Hogwarts and are forced to work together on some assignment that leads them to the same conclusion.)
(Alternatively, they both work together at the Ministry after years of hatred at Hogwarts and are forced to work together on some assignment that leads them to the same conclusion.)

— set by MJ! —