I have trouble understanding why the second postulate of Special Relativity implies the invariance of spacetime interval $\Delta s^2=-c^2\Delta t^2+\Delta x^2+\Delta y^2+\Delta z^2$.
Suppose we have two frames $O$ and $O'$. $O'$ moves at constant velocity $v$ relative to $O$. At initial time $t=t'=0$, observers at both frames emit a light beam in the x-direction. According to the second postulate, both observers agree that the speed of light is constant:
$$c=\frac{\Delta x}{\Delta t}=\frac{\Delta x'}{\Delta t'}$$
However, I don't understand how it follows that
$$-c^2\Delta t^2+\Delta x^2=-c^2\Delta t'^2+\Delta x'^2$$