First Solution. The key observation is the following Lemma.
Lemma. *Segment* D1Q *is a diameter of circle* ω.
*Proof.* Let I be the center of circle ω, that is, I is the incenter of triangle ABC. Extend segment D1I through I to intersect circle ω again at Q′, and extend segment AQ′ through Q′ to intersect segment BC at D′. We show that D2=D′, which in turn implies that Q=Q′, that is, D1Q is a diameter of ω.

Let ℓ be the line tangent to circle ω at Q′, and let ℓ intersect segments AB and AC at B1 and C1, respectively. Then ω is an excircle of triangle AB1C1. Let H1 denote the dilation with center A and ratio AD′/AQ′. Since ℓ⊥D1Q′ and BC⊥D1Q, ℓ∥BC. Hence, AB/AB1=AC/AC1=AD′/AQ′. Thus, H1(Q′)=D′, H1(B1)=B, and H1(C1)=C. It also follows that the excircle Ω of triangle ABC opposite vertex A is tangent to side BC at D′.
It is well known that
CD1=21(BC+CA−AB).(1)
We compute BD′. Let X and Y denote the points of tangency of circle Ω with rays AB and AC, respectively. Then by equal tangents, AX=AY, BD′=BX, and D′C=YC. Hence,
AX=AY=21(AX+AY)=21(AB+BX+YC+CA)=21(AB+BC+CA).
It follows that
BD′=BX=AX−AB=21(BC+CA−AB).(2)
Combining (1) and (2) yields BD′=CD1. Thus,
BD2=BD1−D2D1=D2C−D2D1=D1C=BD′,
that is, D′=D2, as desired. ■
Now we prove our main result. Let M1 and M2 be the midpoints of segments BC and CA, respectively. Then M1 is also the midpoint of segment D1D2, from which it follows that IM1 is a midline of triangle D1QD2. Hence,
QD2=2IM1(3)
and AD2∥M1I. Similarly, we can prove that BE2∥M2I.

Let G be the centroid of triangle ABC. Thus, segments AM1 and BM2 intersect at G. Define transformation H2 as the dilation with center G and ratio −1/2. Then H2(A)=M1 and H2(B)=M2. Under the dilation, parallel lines go to parallel lines and the intersection of two lines goes to the intersection of their images. Since AD2∥M1I and BE2∥M2I, H maps lines AD2 and BE2 to lines M1I and M2I, respectively. It also follows that H2(P)=I and that
APIM1=AGGM1=21
or
AP=2IM1.(4)
Combining (3) and (4) yields
AQ=AP−QP=2IM1−QP=QD2−QP=PD2,
as desired.
Second Solution. From the Lemma, we have
AD2AQ=rar,
where r and ra are the radii of circles ω and Ω, respectively. Note that
r(AB+BC+CA)=2[ABC]
and that
ra(AB+AC−BC)=2[IaAB]+2[IaAC]−2[IaBC]=2[IaBAC]−2[IaBC]=2[ABC],
where Ia is the center of Ω and [R] is the area of region R. Thus,
AD2AQ=AB+BC+CAAB+AC−BC.(5)

Applying Menelaus's Theorem to triangle AD2C and line BE2 gives
PD2AP⋅BCD2B⋅E2ACE2=1,
or
PD2AP=D2B⋅CE2BC⋅E2A=CD1⋅AE1BC⋅CE1=AE1BC=AB+AC−BC2BC.
Hence,
PD2AD2=1+PD2AP=AB+AC−BCAB+AC+BC,
or
AD2PD2=AB+AC+BCAB+AC−BC.(6)
The desired result now follows from (5) and (6).