play both ends against the middle

To play both ends against the middle means to try to make two people or two groups compete with each other in order to get the advantage for yourself. This can used both literally or figuratively depending on the connotations or the situations it is referring to. Literally, it may be used in some type of race or competition, while figuratively the phrase is usually in reference to a person playing to people against each other for his or her own benefit.