We propose two economical algorithms for numerical solution of the problem of identifying the right-hand side of the Poisson equation from information on the solution on the boundary of the domain. Both algorithms are based on the method of separation of variables. The method is presented on a discrete level. We use the nonuniform grids along one of the coordinates. There are possible applications for operators with variable coefficients of a special kind.