A filtration problem in a composite porous material with two free boundaries