We study trajectory design for a spacecraft escaping from Mars in the context of spatial restricted three-body problem (SR3BP) by using tube dynamics. First, we compute the halo and quasi-halo orbits around L1of Sun-Mars system together with the associated invariant manifolds. Then we investigate whether the spacecraft with a certain energy is inside of the tube to connect the manifold with the Phobos orbit. We also perform grid search with the SR3BP with the same energy as the invariant manifold. Comparing numerical results between grid search and the tube dynamics, we show how to determine the propriety for the escape trajectory by using the tube dynamics. Consequently we clarify the way to judge whether the spacecrafts can escape or not in the spatial problem.