a. We first prove the similarity △CMD∼△ABC. Since BC and MD are parallel, we find that ∠ADM=∠ACB=90∘ and also ∠AMD=∠ABC. It follows that △ABC∼△AMD. Because ∣AB∣=2∣AM∣ we also have that ∣AC∣=2∣AD∣ and thus ∣AD∣=∣DC∣. This implies the congruence △AMD≅△CMD: both triangles have a right angle at D and the two adjacent sides have the same length. Now we have that △ABC∼△AMD≅△CMD, and so it holds that △CMD∼△ABC.
Now we will prove that △CME∼△ABD. We already know that ∠ECM=∠DCM=∠CAB=∠DAB, and also that
∣CM∣∣EC∣=∣CM∣21∣DC∣=∣AB∣21∣CA∣=∣AB∣∣DA∣
This implies that △CME∼△ABD: the triangles have one equal angle and the two adjacent sides have the same ratio.
b. Let F be the intersection of BD and CM. Since BD is perpendicular to CM we have that ∠BFM=90∘. So in the triangle △BFM we have that ∠BMF+∠FBM=90∘. Because of the similar triangles in part (b) we have ∠FBM=∠ABD=∠CME=∠FME. It follows that ∠BMF+∠FME=90∘, hence EM is perpendicular to AB. □