Ganguly inherited a team that was smarting from the aftermath of the match-fixing scandal and not only turned it into a crack outfit but also dispelled the air of cynicism that had turned every cricket fan into a skeptic.
The left-hander from Bengal found a perfect foil in New Zealander John Wright and their contrasting yet complementing style of functioning augured well for the team as they returned from Australia with honours even, beat Pakistan at their den besides making the final of the 2003 World Cup.

Please explain to me the meaning of "foil" here.
Foil: anything that serves by contrast to call attention to another thing's good qualities ("Pretty girls like plain friends as foils")
It means perfect contrast. A person or a thing setting off another to an advantage.
As shown here too, the two persons contrasting yet complimenting each other.