In his paper "On the electrodynamics of moving bodies" that laid down the foundation of Special Relativity Einstein defined what clocks separated in space are synchronous and derived the Lorentz transformations from his definition. The definition is as follows. Two clocks located at points A and B respectively are synchronous if
T_{B}  T_{A} = T^{'}_{A}  T_{B} (1),
where T_{A} is the time on the clock located at point A when light was emitted from this point towards point B, T_{B} is the time on the clock located at point B when the light reached it and was reflected back by a mirror, and T^{'}_{A} is the time on the clock located at point A when the light returned to it.
From (1) Einstein derived the relationship between spacetime coordinates of the same point in two inertial frames of reference, one of which moves with speed v along the xaxis of the other. He supposed that the point has coordinates (x,y,z,t) in the stationary frame of reference and (ξ, η, ζ, τ) in the moving frame of reference and was looking for expressions of (ξ, η, ζ, τ) through (x,y,z,t), i.e. for functions ξ(x,y,z,t), η(x,y,z,t), ζ(x,y,z,t), τ(x,y,z,t). But since the latter frame of reference moves along the xaxis of the former, y and z are constants, and, hence, the problem was reduced to finding functions ξ(x,t) and τ(x,t) as η(x,y,z,t) = const and ζ(x,y,z,t) = const.
He started with finding the expression for τ(x,t). He did it in 2 steps. In the first step he found the expression for τ(x',t), where x' = xvt, and then converted it into the expression for τ(x,t).
The substitution of x by x'= xvt is not intuitive and could had been retroactively invented to simplify the derivation. That is why below I present a direct derivation of τ(x,t) and ξ(x,t) from (1).
Besides Einstein's derivation is sketchy and omits some intermediate steps, which makes it unclear to many people even with the relevant background in physics and mathematics. That is why I decided to devise such a derivation, which would have no gaps and would be clear to anyone with knowlege of Calculus I and elementary physics.
Suppose that a rod of length r (measured in the stationary frame of reference) is moving with speed v along the xaxis. (The procedure of how to measure the length of a moving rod in a stationary frame of reference is described in Einstein's paper and the reader is referred to it.) Suppose that the left end of the rod is the origin of the moving frame of reference. Suppose that at the moment t=0 the origins of both frames of reference coinsides, i.e. x=0 and ξ=0.
Let at this instant a ray of light be emitted from the left end of the rod towards the right end. Suppose that the ray reaches the right end when its spatial coordinates in the stationary frame of reference are (x_{1}, 0, 0). Suppose that the time on the stationary clock located at that point is t_{1}. Suppose that the light gets reflected by the mirror located at the right end of the rod and returns to the left end when its spatial coordinates in the stationary frame of reference are (x_{2}, 0, 0) and the stationary clock at that point shows time t_{2}.
Suppose that at both ends of the rod synchronized clocks are located and move with the rod. Then the time on the clock at the left end when the ray was emitted was τ(0,0), the time on the clock at the right end when the ray reached it was τ(x_{1},t_{1}), and the time on the clock at the left end when the ray returned to it was τ(x_{2},t_{2}). Since the clocks are synchronous, we have
τ(x_{1},t_{1})  τ(0,0) = τ(x_{2},t_{2})  τ(x_{1},t_{1})
or
τ(0,0) + τ(x_{2},t_{2}) = 2τ(x_{1},t_{1}) (2)
Since the rod moves with speed v the spatial coordinates of its left end in the stationary frame of reference at any moment t are (vt, 0, 0), where t is common time for all points of the stationary frame of reference. The spatial coordinates of the right end are (vt+r, 0, 0) respectively. Thus, we have that x_{1} = vt_{1} + r and x_{2} = vt_{2}. On the other hand t_{1} is the time taken by the light to reach (x_{1}, 0, 0) from the origin of coordinates. Hence, x_{1} = ct_{1}. Since x_{1} = vt_{1} + r, it follows that ct_{1} = vt_{1} + r, and
t_{1} =  r  (3) 
cv 
After reflecting from the right end of the rod, which coordinates in the stationary frame of reference were (x_{1}, 0, 0) at the time t_{1}, the light returns to the left end. When it happens the spatial coordinates of the left end in the stationary frame of reference are (x_{2}, 0, 0), and the stationary clock at that point shows t_{2}. Hence the light covered the distance of x_{1}  x_{2} over the time interval t_{2}  t_{1}. Thus, x_{1}  x_{2} = c(t_{2}  t_{1}). Since, x_{1} = vt_{1} + r and x_{2} = vt_{2}, we have that vt_{1} + r  vt_{2} = c(t_{2}  t_{1}), or r = (c+v)(t_{2}  t_{1}). Hence,
t_{2}  t_{1} =  r  (4) 
c+v 
and taking into account (3)
t_{2} =  r  +  r  =  2rc  (5) 
c+v  cv  c^{2}v^{2} 
Hence
x_{2} = vt_{2} =  2rcv  (6) 
c^{2}v^{2} 
and
x_{1} = vt_{1} + r =  vr  + r = r (  v  + 1) =  rc  (7) 
cv  cv  cv 
Substituting t_{1}, t_{2}, x_{1}, and x_{2} in (2) by the above expressions (3), (5), (7), and (6) respectively, we obtain:
τ(0,0) + τ (  2rcv  ,  2rc  ) = 2τ(  rc  ,  r  ) (8) 
c^{2}v^{2}  c^{2}v^{2}  cv  cv 
For small x and t τ(x,t) can be approximated by the first 3 terms of its Taylor series:
τ(x,t) = τ(0,0) +  ∂τ(0,0)  x +  ∂τ(0,0)  t (9) 
∂x  ∂t 
Hence, (8) can be rewritten as
2τ(0,0) +  ∂τ(0,0)  2cvr  +  ∂τ(0,0)  2rc  = 2τ(0,0) +  ∂τ(0,0)  2rc  +  ∂τ(0,0)  2r  
∂x  c^{2}v^{2}  ∂t  c^{2}v^{2}  ∂x  cv  ∂t  cv 
or
∂τ(0,0)  cv  +  ∂τ(0,0)  c  =  ∂τ(0,0)  c  +  ∂τ(0,0)  1  
∂x  c^{2}v^{2}  ∂t  c^{2}v^{2}  ∂x  cv  ∂t  cv 
or
∂τ(0,0)  cv  +  ∂τ(0,0)  c  = c  ∂τ(0,0)  +  ∂τ(0,0)  
∂x  c+v  ∂t  c+v  ∂x  ∂t 
or
∂τ(0,0)  (  cv   c) +  ∂τ(0,0)  (  c   1) = 0 
∂x  c+v  ∂t  c+v 
or
∂τ(0,0)  (  cvc^{2}cv  ) +  ∂τ(0,0)  (  ccv  ) = 0 
∂x  c+v  ∂t  c+v 
or
c^{2}  ∂τ(0,0)  + v  ∂τ(0,0)  = 0 (10) 
∂x  ∂t 
Although the partial derivatives ∂τ(0,0)/∂x and ∂τ(0,0)/∂t in the Taylor series are constants rather than functions we can generalize the above relationship by omitting (0,0) and thereby converting it into a differential equation:
c^{2}  ∂τ  + v  ∂τ  = 0 (11) 
∂x  ∂t 
It is obvious that solution to the differential equation will also satisfy (10).
The solution to the differential equation is
τ(x,t) = a(t  vx/c^{2}) (12)
Let the right end of the rod has the spatial coordinates (ξ(x,t),0,0) in the moving frame of reference. The light emitted from the left end takes time τ(x,t) to reach the right end. Hence ξ(x,t)/τ(x,t) = c. On the other hand, in the stationary frame of reference the same light traveled distance x over time t. Hence x/t = c. Thus
ξ(x,t) = cτ(x,t) = (xτ(x,t))/t = a(tx  vx^{2}/c^{2})/t = a(x  vx^{2}/(c^{2}t)) = a(x  (vx/c^{2})(x/t)) = a(x  (vx/c^{2})c) = a(x  v(x/c)) = a(x  vt) (13)
Thus, we arrive at the following transformations:
ξ(x,t) = a(x  vt)  
τ(x,t) = a(t  vx/c^{2}) 
The stationary frame of reference is moving relative to the moving frame of reference with the speed of v. Hence, from the principle of relativity we obtain:
x = a(ξ + vt)  
t = a(τ + vξ/c^{2}) 
Hence,
ξ = a(a(aξ+vτ)  va(τ+vξ/c^{2})) = a(aξ + avτ  avτ  av^{2}ξ/c^{2}) = a^{2}ξ(1  v^{2}/c^{2})
Dividing the both sides of the equation by ξ, we obtain
1 = a^{2}(1  v^{2}/c^{2}))
or
a =  1 
√ 1  (v/c)2 
Thus, we arrive at the Lorentz transformations


