Why is this even a question. This coach vs player conflict may have some value and consequences in Football, but in cricket this nonsense comes from trying to replicate football too much. In a Football the coach/manager is the final authority in picking teams, finalising inplay strategy making changes etc. However in cricket the coach has a very limited role to merely act as an advisor, and the final say in all things rests with the captain, including batting order, bowling changes field placements, etc. The job of a coach is merely to advise the captain on that, or to help with some techniques etc. Unlike Football where the Coach has a very foreground role and a primary one, in cricket the job of the coach is very much in the background and a secondary one.
In cricket the captain and players always take precedence over the coach. It is the players who acting upon instructions of the captain, score the runs, take the wickets etc. The coach neither is the final authority on strategy nor does he score the runs or take the wickets or the catches.
So really if ever there is a conflict between someone doing a primary job (Peterson) and someone doing a secondary job (Flower), naturally the one doing the secondary job has to go. Why should there even be any debate on this is beyond me. If Peterson was fighting with the captain I would understand the need to dump him, but a conflict with someone doing a secondary role, is another thing entirely.
Flower should be the one to go, 100%. All he has to do is advise, and if cannot do that without creating a scene, or becoming larger than the players then he needs to go.