a) We denote ∠BAE=∠AEM=∠AMP=α.
We have, in turn ∠DAE=90∘−α, ∠EAC=α−45∘, ∠DEA=∠EAB=α, ∠CEM=180∘−2α.
From the triangle CPM follows that ∠PMC=180∘−∠AMP=180∘−α and then ∠CPM=α−45∘. Thus ∠EAC=∠CPM=α−45∘.
Denote by H the intersection of the lines AE and PM. The quadrilateral HAPC has ∠HAC=∠HPC=α−45∘ so it is inscribed, hence ∠AHP=∠ACP=45∘. Moreover, ∠AHP=∠EHM=∠ECM=45∘, so the quadrilateral HEMC is inscribed and ∠HCM=∠AEM=α.
Returning to the inscribed quadrilateral HAPC, we have ∠HPA=∠HCA=α, so the triangle AMP is isosceles.
b) In the isosceles triangle MAP we have ∠MAP=180∘−2α, thus ∠PAB=∠CAB−∠MAP=45∘−(180∘−2α)=2α−135∘.
We extend side CE with segment DQ=BP. From the congruence of the triangles ADQ and ABP (SAS) it follows that ∠QAD=∠PAB=2α−135∘. Thus ∠EAQ=∠EAD+∠DAQ=α−45∘, which means ∠EAQ=∠EAM. Now the congruence of the triangles EAQ and EAM (ASA) yields EM=EQ=ED+DQ=ED+BP.