Angle A+ angle d = twice angle p.
Connect BC, and list the internal angles and formulas of triangles ABC, BPC and BDC according to the triangle internal angle theorem. It is easy to find the angle p with angle A+ angle D=2 times.
There is something wrong with the second question. Angle c has nothing to do with angle a and angle B.