Presumably, only one target piston is allowed to move freely at a time, otherwise, I'm not sure how you could calculate several pistons' movement simultaneously.
This is identical to filling cylindrical glasses of water.
If you start with a glass that is 10cm in diameter, and it is filled with 1L of water, the height of the water will reach X.
If you pour that entire 1L of water (i.e. volume does not change) into another glass of 5cm diameter, what level will the water reach and how do you calculate that?