In a Lorentz velocity boost, the lines of simultaneity and same-position are altered. It is obvious from the Fig.5.2, that these lines are rotated towards each other over the same angle, and the spacing is also changed. To determine the scale factor, consider the triangle in Fig.5.2.

The tangent of the rotation angle is the velocity of the moving frame (red) as seen from the stationary frame (black). Observer is at rest in the frame indicated by the red arrow, and reads the time between the origin and some event , simply as the proper time of a co-moving clock.
However, observer sees this measurement as a combined measurement of a time interval and a distance , and calculates the spacetime distance as . Because this spacetime distance must be the same for both observers we have