How are the two formulas for enantiomeric excess/optical purity equal?
The equations are trivially equal since each is equal to the enantiomeric excess. To prove this, we need only show each equal to the enantiomeric excess.



Start with the second equation. Because both enantiomers have the same molar mass, we can divide both numerator and denominator by the molar mass of the compound and rewrite the equation as $$\text{EE} = \frac{|\text{difference in moles of enantiomers}|}{\text{total moles of enantiomers}} = |\text{difference in mole fractions of enantiomers}|,$$ which is the definition of enantiomeric excess. This equation is not very useful, since most of the time the masses of each of the enantiomers in solution are not known.

The first equation, as you have it, is incorrect. Following Ben Norris's suggestion, we write $$\text{EE} = \frac{|[\alpha]_\text{obs}|}{[\alpha]_\text{pure}} = \frac{|[\alpha]_\text{obs}|}{[\alpha]_\text{pure}} = \frac{|\chi[\alpha]_\text{pure}-(1-\chi)[\alpha]_\text{pure}|}{[\alpha]_\text{pure}} = |\chi-(1-\chi)|,$$
where $\chi$ represents the mole fraction of one enantiomer, and we once again obtain the same result.



Had your original equation been right, $L$ would have cancelled in your derivation and you would have obtained $(c_d-c_l)/(c_d+c_l)$, which is readily brought to equation $(2)$.