In earlier investigations, the authors analyzed optimal atmospheric trajectories with and without a heating rate constraint for aero-gravity assist (AGA), compared Venus-AGA and Mars-AGA, and showed that Mars is a better candidate for AGA missions. But the trajectories were all confined to ecliptic plane. In this paper, the Hamiltonian formulation based on Pontryagin's maximum principle has been used to extremize the heliocentric velocity of the spacecraft when a simultaneous heliocentric plane change maneuver is carried out. Mars was selected as the planet for AGA. The paper shows that AGA without heliocentric plane change followed by a heliocentric plane change by thrust application is less fuel efficient than AGA with heliocentric plane change. Furthermore, it is shown that in the case of minimization of heliocentric velocity of the spacecraft, the fuel saving increases with the increase in heliocentric plane change.