Let us denote by Q, R and S the midpoints of BC, AB and AC respectively. Then O3R⊥AB, O1R⊥AB, O3S⊥AC, O2S⊥AC, O3Q⊥BC and MQ⊥BC. Assuming ∠ABC=β and ∠BCA=γ, we get ∠BO3O1=γ and ∠CO3O2=β, as O3 is the circumcenter of △ABC.

Since BC is tangent to ω1, A~B=β. So ∠BO1O3=β. Similarly ∠CO3O2=γ. Hence ∠BO3O1=∠CO2O3=γ and ∠BO1O2=∠CO3O2=β. Thus, ∠CO2O2∼∠BO1O3.
Let us denote the radii of ω1 by r1, the radii of ω2 by r2 and the radii of ω3 (the circumcircle of △ABC) by r3. Then r3=CO3=BO3=AO3=AD, r1=O1B=O1A and r2=O2C=O2A. Also ∠O1BO3=∠O1AO3 and ∠O2CO3=∠O2AO3. It follows that ∠O1AO3=∠O2AO3, which means ∠O1AD=∠O2AD. From ∠CO3O2∼∠BO1O3, we have O3BO1B=CO2CO3, i.e r3r1=r2r3. Then ADAO1=AO2AD holds. So ∠O1AD∼∠DAO2. Hence
DO2DO1=ADAO1=r3r1(∗)
r3r1=ADAO1=sin∠AO1Dsin∠ADO1=sin∠ADO2sin∠ADO1(∗∗)
Now we use the law of sines to △O2MD and △DMO1.
sin∠O2DMO2M=sin∠O2MDDO2,sin∠O1DMO1M=sin∠O1MDDO1
From thus, we'll get DO2DO1=sin∠O1DMsin∠O2DM. Then from () and (*),
DO2DO1=r3r1=sin∠ADO2sin∠ADO1,sin∠O1DMsin∠O2DM=sin∠ADO2sin∠ADO1
it is equivalent to
sin∠O1DMsin(∠O1DO2−∠O1DM)=sin∠ADO2sin(∠O1DO2−∠ADO2)
sin∠O1DMsin∠O1DO2cos∠O1DM−cos∠O1DO2sin∠O1DM=sin∠ADO2sin∠O1DO2cos∠ADO2−cos∠O1DO2sin∠ADO2
sin∠O1DO2ctg∠O1DM−cos∠O1DO2=sin∠O1DO2ctg∠ADO2−cos∠O1DO2
Since sin∠O1DO2=0, we obtain ctg∠O1DM=ctg∠ADO2. Hence ∠O1DM=∠ADO2 (0∘<∠O1DM,∠ADO2<180∘).