Revolver
(2005)

Short Version:
Avi (Andre Benjamin) and Zach (Vincent Pastore) are the men who were on either side of Jake Green (Jason Statham) in prison. All their methods were an attempt to apply "The Formula", and thus save Jake's life.

Long Version:
Jake Green decides not to kill Dorothy Macha (Ray Liotta), finally figuring out that the mysterious Sam Gold is actually part of his psyche. After a confrontation in a stalled elevator, Jake leaves that part of him behind, finally becoming his own person. After coming back to the loansharks, Avi and Zach, he finally realizes that they were the two prisoners on either side of him in the cell block, the ones who developed The Formula (the ideas allowing Jake to win any game of chance, and also what made him so good at chess). The two had been manipulating him from the moment he got out of prison (and all the way through the film, as well), in an effort to get him to realize that his mind was the real enemy, and not the people around him

Thanks Tetsuo!