kid and law did win on their own merit; they threw big mom into magma, which is the main thing that KO’d her.
what you say makes no sense. In both cases, kid and law played major roles that allowed their infamy to rival Luffy’s. They also fought people stronger than the people zoro and sanji fought.
What did Law do vs Doflamingo that granted him 500m bounty? Hell, Doflamingo said he was mostly healed before G4 rolled up. He essentially landed a big attack then went out of the fight to the sidelines before the final battle even started (G4 vs Doffy). A different version of essentially what Zoro did on Rooftop.
But he got the infamy, because him just being there made WG conclude he was equally responsible for Doffy's fall.
Just like how WG assumed Kidd, Luffy, and Law are all equally responsible for BM + Kaido's fall and gave them a bounty who's sum is close to Kaido + BM's bounty sum.
As long as Kidd and Law are present in a big event, they'll get the infamy of that event close to Luffy's, if not same, despite doing far less.