I/O operations, Type casting of C++, How to think programatically.

When the The waves travel there will be the inertia to the wave and also and there will be increase in distance from the moment wave left the planet?

Yes, from the perspective of physics, this point is completely valid. Generally, The time take for round trip wave travel is given by $\frac{2*\textit{distance}}{c}$, but if there is a relative velocity, i.e one planet is moving with respect to other, then we need to account for 2 things planet movement adds inertia so velocity of wave will be ( c + v ), as light can be treated as both particle and wave. and the return distance will not be d but ( d + vt ).

$$\textit{time} = \frac{2*\textit{distance}}{c}$$

$$\textit{time} = \frac{2*\textit{distance}}{c - 2v}$$

As $v$ <<<< $c$, and we only need time in 2 decimal precision, 2v can be ignored.