The gas produced as a result of the mixture of hydrogen and oxygen in the rocket , is expelled rapidly by the rear. That is, to expel the gas, the rocket has to apply force on the gas , this is the action. As a result of the action , the gas also applies a reaction force on the rocket against the motion of the gas, which causes the rocket to move forward. So it can be said that the rocket obeys Newton's 3rd law.