Manchester City are within touching distance of the Champions League after finally discovering a formula to win games after months of struggles.