a. Note that ∠DEB=∠DFC then ∠DEA=∠DFA, which implies MNEF is a cyclic quadrilateral.
We have ∠DI2F=2∠DNF=2∠EMF and
∠I2DF=90∘−21∠DI2F
so I2D⊥ME. We also have J1K⊥ME and it follows that I2D∥J1K. Similarly, we get I1D∥J2H. Hence, ∠I2DK=∠DKJ1=∠KDJ1 or DK is the bisector of ∠I2DI1. Similarly, we also have DH is the bisector of ∠I2DI1. Hence, three points D, H and K are collinear.
Since MNEF is cyclic, AE⋅AM=AF⋅AN, so A belongs to the radical axis of (I1) and (I2) which implies A, D and P are collinear. Furthermore,
∠AKH=90∘−∠DKJ1=90∘−∠DHJ2=∠DHF=∠AHK
so AH=AK. It follows that A has the same power to (J1) and (J2), or A lies on the radical axis of (J1) and (J2). Hence, A, D and Q are collinear.
From these, we have four points A, D, P, Q are collinear.
b. Since AK is a tangent of (J1) then ∠AQK=∠AKD=∠AHK, it follows that AQHK is cyclic. We have ∠GEF=∠GAF=∠GKH, ∠GHK=∠GAK=∠GFE so △GEF∼△GKH (a.a).

Take the point S in EF such that SE:DF=DK:DH, then △GES∼△GKD (s.a.s). Thus, △GEK∼△GSD (s.a.s). From here, we have
∠GDS=∠GKE=∠GQD
so DS is the tangent of the circumcircle of triangle GDQ. Similarly, △LEF∼△QKH (a.a) so △LES∼△QKD (s.a.s). Hence, ∠KQD=∠ELS, and
∠KQG=∠KHG=∠EFG=∠ELG
which implies ∠SLG=∠DQG=∠GDS. It shows that DLGS is a cyclic quadrilateral. From these results, the problem is proved. □