In multiple instances in the season 5 premier, the rules of time travel are alluded to. These include at the beginning when Pierre mentions that there are rules to going back and changing things. Faraday has also mentioned on many occasions that its impossible to change the past because that breaks the rules.
Perhaps when Keamy killed Ben's daughter and Ben exclaimed that Widmore changed the rules, Ben already knew what was supposed to happen. Maybe Ben and Widmore both know, to a degree, how their struggle is supposed to play out, and how certain elements of it will occur. Alex wasn't supposed to die, according to this plan. So maybe when everyone is referring to rules, they're referring to the same rules and perhaps Widmore found some way to break/change them.
Theory by Coincidence
Perhaps when Keamy killed Ben's daughter and Ben exclaimed that Widmore changed the rules, Ben already knew what was supposed to happen. Maybe Ben and Widmore both know, to a degree, how their struggle is supposed to play out, and how certain elements of it will occur. Alex wasn't supposed to die, according to this plan. So maybe when everyone is referring to rules, they're referring to the same rules and perhaps Widmore found some way to break/change them.
Theory by Coincidence