In classical celestial mechanics, the theory of perturbation based on Keplerian motion is well developed. Various kinds of perturbed motion equations are described by canonical equations, Lagrange equations and Newton's equations. The masses of bodies are assumed constant and the bodies are point or spherical. Classical perturbation theory is a basic tool in the study of many astronomical problems. Observational astronomy shows that the masses of real cosmic bodies change over time. Real celestial bodies are neither spherical nor solid. Celestial bodies are non-stationary and their masses, sizes, shapes and structures change over time as they evolve. There are now a number of studies with a community bibliography of papers on the celestial mechanics of bodies of variable mass. However, the perturbation theory for unsteady space systems is not sufficiently developed. Therefore, we considered a gravitational system consisting of three spherical celestial bodies, with spherical density distributions, with variable masses in the restricted formulation. We have considered the general case where the masses of the bodies change non-isotropically at different rates, in the presence of reactive forces. We will assume that a body with infinitesimal mass has no effect on the motions of the two main bodies. The problem was investigated by methods of perturbation theory based on aperiodic motion along the quasi-conic section developed for nonstationary gravitating systems. Evolution motion equations of a less massive body and a small body in oscillating elements, in the relative coordinate system, have been obtained.