Analytical studies for well design adjacent to river banks are the most significant practical task in cases involving the efficiency of riverbank filtration systems. In times when high pollution of river water is joined with increasing water demand, it is necessary to design pumping wells near the river that provide acceptable amounts of river water with minimum contaminant concentrations. This will guarantee the quality and safety of drinking water supplies. This article develops an analytical solution based on the Green's function approach to solve an inverse problem: based on the required level of contaminant concentration and planned pumping time period, the shortest distance to the riverbank that has the maximum percentage of river water is determined. This model is developed in a confined and homogenous aquifer that is partially penetrated by the stream due to the existence of clogging layers. Initially, the analytical results obtained at different pumping times, rates and with different values of initial concentration are checked numerically using the MODFLOW software. Generally, the distance results obtained from the proposed model are acceptable. Then, the model is validated by data related to two pumping wells located at the first riverbank filtration pilot project conducted in Malaysia.