The optimization of the spacecraft (SC) interplanetary space flight trajectory is considered. Rigid conditions of phasing are supposed on one of the trajectory bound point. The SC docks to/undocks from the existing station or lands on/flies up from the natural satellite of the planet. On another end hit the point type rendezvous condition is considered. The SC and the station/the planet natural satellite are relied to be non-Attracting material points. The control of the SC is realized by a large limited jet engine thrust. The start, the finish, the moments of inclusion and switching off of the SC jet engine thrust are optimized. Weight losses are minimized. The problem is formalized as an optimal control problem and decides on the basis of the Pontryagin's maximum principle. The boundary value problem is solved numerically with the use of shooting method, Newton's method and the parameters continuation method. Transversality conditions of a maximum principle are effective for the time optimization on the trajectory end with hit the point condition. And for time optimization on the bound point with a phasing condition -The external optimization with the use of a combination of gradient methods and a method of continuation of the decision on parameter is made. One of the main difficulties in solving of such problems is constructing good initial parameter values approximation. As example, technique of creation extremals in the problem is showed on the SC returning with samples of soil from the Mars satellite Phobos to the Earth optimization, with taking into account ephemerides. The original problem is multiextremal, a launch window to the Earth from Mars opens each two years. Besides, for each round of Phobos around Mars exists a local optimum trajectory. Therefore, in the beginning of solution global optimization is made: The SC flight is approximated with series of close Lambert's problems. Then the problem is solved in pulse statement on the basis of the Lagrange principle with consideration of the Sun, and Mars attraction on each part of the trajectory. © 2017 Univelt Inc. All rights reserved.