Analytical and numerical methods of solving inverse problems for logarithmic and Newtonian potentials are investigated. The following contact problem in the case of aNewtonian potential is considered: In a domain Omega{Omega : - l <= x, y <= l, H - phi( x, y) <= z <= H} there are sourceswith density rho(x, y) that perturb the Earth's gravitational field. Here phi(x, y) is a nonnegative compactly supported function with a support Omega = [-l, l](2), 0 <= phi(x, y) <= H. It is required to simultaneously restore the depth H of the contact surface z = H, the density rho(x, y) of the sources, and the function.(x, y). Methods of simultaneous determination based on nonlinear models of potential theory are developed in this paper. The following basic information is used in case of a Newtonian potential: (1) values of the gravity field and its first and second derivatives; (2) values of the gravity field at different heights. A method of simultaneous recovery of the functions rho(x, y), rho(x, y) and the constant H in analytical form is demonstrated. Iterative methods for the simultaneous recovery are constructed. The efficiency of the numerical methods is demonstrated on model examples.