The text is an idiomatic expression that advises against getting rid of something good when trying to get rid of something bad. It does not play on different meanings of a word or similar-sounding words.
Don ' t throw the baby out with the bathwater .