This paper is devoted to the study of relative motion and close encounters of two cosmic bodies located in near almost-circular orbits. This problem is topical due to the asteroid hazard proceeding from the NEA group asteroids located in the near-Earth orbits. The (99942) Apophis asteroid, a representative of this group discovered in July 2004 by the Kitt Peak observatory (Arizona), is considered as an example.