Flow to wells in aquifers separated by a semipervious layer