Time dilation and length contraction are popular derivations in special relativity of modern physics. Thy are very easy to prove. Its difficult to type all the formula stuff, so i'll post some links you can go through. If there something u dont understated let me know, im happy to help

.
http://www.drphysics.com/syllabus/time/time.html
thx...
menna e note1
Time Dilation
This is a derivation of the time dilation formula. This will be covered in detail in class, but here it is just in case it goes by too fast. Refer to Fig. 1.
A clock is made by sending a pulse of light toward a mirror at a distance L and back to a receiver. Each "tick" is a round-trip to the mirror. The clock is shown at rest in the "Lab" frame in Fig. 1a, or any time it is in its own rest frame. Consequently, it also represents the clock at rest in rocket#1. Figure 1b is the way the clock looks in the lab when the clock is at rest in rocket#1, which is moving to the right with velocity v.
Actually, our clock "ticks" once every round-trip of the light pulse. So, we should use ct=2L, etc. But since both legs of the round-trip are the same, we'll just use the one-way times for simplicity.
Some notation:
t = time for light to reach the mirror in the lab for a clock at rest in Rocket #1 (Fig. 1b)
t' = time for light to reach the mirror in Rocket#1 in its own rest frame (Fig. 1a)
L = distance to mirror
So, the times and distances are related as follows:
L = ct'
L2 + v2*t2 = c2*t2 (Pythagorean theorem)
Eliminate L from the equations:
c2*t'2 = c2*t2 - v2*t2
t' = t*√(1-v2/c2)
Since √(1-v2/c2)<1, the clock at rest in rocket#1 appears slow to observers in the lab.
Go back to Fig. 1c. Rocket#2 is moving with velocity v to the left . Those clocks would also appear slow to observers in the lab. But, it is also the way a clock at rest in the lab appears in rocket#1. So, lab clocks also appear slow to observers in the lab. Relativity is symmetrical!