Sticking to just two spacetime coordinates, ##x## and ##t##, the following linear transformation satisfies time dilation and length contraction:
- ##x' = \gamma (x - v t)##
- ##t' = \frac{1}{\gamma} t - A (x - v t)##
The constant ##A## is arbitrary.
To see that it satisfies time dilation, let the events ##e_1## and ##e_2## take place at the same value of ##x'##, with ##e_2## occurring after ##e_1##. Let ##(x_1, t_1)## be the coordinates of ##e_1## in the unprimed frame and let ##(x_1', t_1')## be the coordinates in the primed frame. Similarly, let ##(x_2, t_2)## and ##(x_2', t_2')## be the coordinates of ##e_2## in the two frames. Let ##\delta x = x_2 - x_1##, etc. Then the Lorentz transformations tell us
##\delta x' = \gamma (\delta x - v \delta t)##
##\delta t' = \frac{1}{\gamma} \delta t - A (\delta x - v \delta t)##
Since ##\delta x' = 0##, that implies that ##\delta x - v \delta t = 0##. So we have: ##\delta t' = \frac{1}{\gamma} \delta t##. So the clocks at rest in the primed frame run slower.
To see that it satisfies length contraction, consider a rod at rest in the primed frame of length ##L## as measured in the primed frame. Let ##e_1## be the measurement of one end of the rod in the unprimed frame, and let ##e_2## be the measurement of the other end. For it to be a valid length measurement, ##e_1## and ##e_2## must take place at the same time, according to the unprimed frame. That means that ##\delta t =0##.
##\delta x' = \gamma (\delta x - v \delta t)##. Using ##\delta x' = L## and ##\delta t = 0## gives:
##L = \gamma \delta x##
So ##\delta x = L/\gamma##. So the rod is shorter when measured in the unprimed frame.
So the additional term ##A (x - vt)## in the formula for ##t'## has no effect on time dilation or length contraction. So its value is arbitrary.
To pin down the value of ##A##, you need another constraint on the transformation. Any of the following will do:
- Assume that an object at rest in the unprimed frame is traveling at velocity ##-v## as measured in the primed frame.
- Assume that light has the same speed ##c## in every frame.
- Assume that the inverse transformation has the same form as the forward transformation (except for the substitution ##v \rightarrow -v##.