I would like to understand how safe landing of a rover is achieved on mars or any other planet where the pressure is very low. Is it achieved by releasing gas from high pressure to low pressure. I assume the equal and opposite reaction of the escaping gas will be swinging in different directions. Then how do scientists manage to channelize the equal and opposite reaction in one single direction to achieve safe landing?
To land any lander on the Moon one must fully use some kind of a rocket engine. These engines are characterized on Earth and the thrust is understood, and a careful trajectory is determined.
To land on Mars is quite a bit trickier, but uses less energy. Basically there is a 3 stage landing system for every US lander. The first is to use a heat shield to slow down using the atmosphere of Mars. The second is to use parachutes to get the velocity even lower. The final stage must be accomplished via rockets, similar to landing on the Moon, or airbags to further slow the speed down. These rocket engines are characterized in a similar way. We understand the atmosphere of Mars and have tested the rockets in similar conditions.
The gases do not escape randomly, but are very much in a specific direction. The flow is basically the same of any rocket launching, the tower of flame below them is mostly in a single direction. The atmosphere can affect how the flow happens after, but that flow won't directly affect the rocket.