It s the momentum conservation (or motion quantity p=mv), and the same explanation why gun slide recoil.
The mas of gas that the jet engine blow out, multiplied for its velocity, must be the same of the mass of the space ship, multiplied for the spaceship velocity.
mv=MV
You have two...