Length contraction and time dilation relationship

We did the following derivation in my electromagnetism lecture

Observer B measures $$c\Delta t'=d$$

Observer A measures $$c\Delta t =l$$

From Pythagoras' theorem: $$d^2+(v\Delta t)^2=l^2$$ $$(c\Delta t')^2+(v\Delta t)^2=(c\Delta t )^2$$ from which $$\Delta t =\Delta t'\gamma\qquad(\alpha)$$
with $$\gamma=\frac{1}{\sqrt{1-\frac{v^2}{c^2}}}$$

Then for the bar moving to the right with the same velocity of the B reference frame, B measures its length as $$L'$$ and A measures it as $$L$$ $$\Delta t' =\Delta t\gamma \qquad(\beta)$$ $$L'=c\Delta t'=c \gamma \Delta t=L \gamma$$ that is, we get length contraction

Equation$$(\beta)$$ is what troubles me. Why don't they use equation $$(\alpha)$$ instead?

Consider the definition of length. We may define it as the difference of the spatial coordinates between two points with respect to a reference frame, when it's temporal coordinates are the same. Basically length is the distance between two points when they are at the same time coordinate.

Thus the relationship between length with respect to two different reference frame may be obtained using the Lorentz Transformation for the spacial coordinates.

Consider, the following scenario, two reference frames A and B. A is stationary, while B is moving with a constant velocity v with respect to A. We assign x and t to the reference frame A, x' and t' to reference frame B.

Note I will be taking $$c=1$$ to the end.

Now consider at some t', we measure a length l with respect to B. The length will be equal to

$$l=(x'_p-x'_o)$$

Now let's write down the transformation equations for $$x'_p$$ and $$x'_o$$.

$$x'_p=\frac{x_p-vt}{\sqrt{1-v^2}}$$

And

$$x'_o=\frac{x_o-vt}{\sqrt{1-v^2}}$$

Now we know how x transforms and hence we will substitute them into our transformation equations.

Here I will consider a simple example, however it can be generalised further. For simplicity, let's consider measurements made at t'=0, between the points x'=0, and x'.

$$x'=\frac{x-vt}{\sqrt{1-v^2}}$$

Now as we have taken $$t'=0$$, we may imply that $$t=vx$$ and from here we can rewrite our transformation equation as

$$x'=\frac{x-v^2x}{\sqrt{1-v^2}}$$

This is going to give us

$$x'=x\sqrt{1-v^2}$$

Adding the speed of light in we get

$$x'=x\sqrt{1-v^2/c^2}$$

Similarly you can arrive at the formula for tube Dilation

Now by our definition what is x'? Length as measured by the moving frame, what is x? Length as measured by the stationary frame. The key here is in the definition of length and time, which brings in the concept of length contraction, and time dilation

Also you must remember that in Special Relativity we don't use time dilation and length contraction, instead we focus on Lorentz Transformations, which are the fundamental equations of Special Relativity.

Also here is a special relativity space time graph, which works on the principles of Lorentz transformations, which will physically show how the effects take place