Here's a cute method for deriving the length equations. Imagine a person swimming in a river with current v m/s. The person himself can swim at c m/s. First, he swims a length l downstream and the same length upstream. His speed, relative to the shore as he swims downstream, is c+v and the time required to swim downstream a length l is
\frac{l}{c+ v}.
His speed, relative to the shore as he swims upstream, is c- v and the time required to swim upstream a length l is
\frac{l}{c- v}
so his total time is
\frac{l}{c+ v}+ \frac{l}{c- v}= \frac{l(c- v)+ l(c+ v)}{c^2- v^2}= \frac{2lc}{c^2- v^2}= \frac{2}{c}\frac{l}{1- \left(\frac{v}{c}\right)^2}
Now, he swims a distance l' across the river and back. Of course, to do that, he must angle slightly upstream so that the vector addition of his speed and the river's will keep him moving across the river. If he take time t, then our vector diagram is a right triangle with hypotenuse of length ct, one leg of length cv, and the other of length l'. By the Pythagorean theorem, (ct)^2= (vt)^2+ l'^2. Then (c^2- v^2)t= l'^2 so that
t^2= \frac{l'^2}{c^2- v^2}
and
t= \frac{l'}{\sqrt{c^2- v^2}}= \frac{1}{c}\frac{l'}{\sqrt{1- \left(\frac{v}{c}\right)^2}}
That is one way across. Coming back will take exactly the same time and so the total time will be
\frac{2}{c}\frac{l'}{\sqrt{1- \left(\frac{v}{c}\right)^2}}.
Now, suppose these two swims take exactly the same time. That is,
\frac{2}{c}\frac{l}{1- \left(\frac{v}{c}\right)^2}= \frac{2}{c}\frac{l'}{\sqrt{1- \left(\frac{v}{c}\right)^2}}
Then we must have
l= l'\sqrt{1- \left(\frac{v}{c}\right)^2}
and
l'= \frac{l}{\sqrt{1- \left(\frac{v}{c}\right)^2}}.
Now, do you see how that relates to the Michaelson-Moreley experiment and length contraction?