How do the scientists calculate the correct time to launch the Mars mission so that the satellite travel time is less? How they are synchronizing the speed of satellite with respect to earth and mars ? Refer this link for more understanding: Animation of MOM and Maven launch
First of all, trajectories of interplanetary missions are not designed to minimize the TRAVEL TIME but to minimize the COST, which is directly related to the fuel required to transfer the probe between the Earth and another planet. One can easily find a solution on how fast and in what direction should the probe travel, and how much time and energy will be spent after departure from the near Earth orbit by solving the gravitational force equations. But that's far not enough to launch a real probe. Scientists have built accurate kinetic models and databases of the motions of solar system objects, such as DE405, by NASA Jet Propulsion Laboratory. Some of them even take account of the perturbations of all major planets in the solar system. Engineers should also build models for the probe itself. For example, how much acceleration will the spacecraft get when turn on the booster, and how does the solar radiation pressure change the attitude angle during the trip. What's more, every probe carries at least one gyro system. Optical guiding telescopes are also widely used to calculate the attitude angle. The speed of the probe can be calculated by the Doppler shift of the radio frequency.
For more details, see the book Interplanetary Mission Design Handbook
There is an extremely accurate model of the solar system and the positions of the planets and so on. So basically you have to lay Newton's equations for Mars, the probe, Earth and so on, you have an equation that models Mars's path, and you have equations for your probe, so you get some x's and y's that eventually will have to match if you want to reach Mars. From there you can then calculate the values for the initial conditions of the probe -such as velocity and direction- that will satisfy you equations.