In (someone’s) favor

To someone’s advantage or credit.

The judge decided the court case in our favor and we did not have to pay the court costs.