On the two-point booundary-value problem for rocket trajectories