The mixture contains 40% milk and 60% water in it. That is 9.6 litres of milk and 14.4litres of water.
Now we are replacing the mixture with pure milk so that the amount of milk and water in the mixture is 50% and 50%.That is we will end up with 12 litres of milk and 12 litres of water.
Water gets reduced by 2.4 litres.
To remove 2.4 litres of water from the original mixture containing 60% water, we need to remove 2.4/0.6 litres of the mixture = 4 litres.