So you can use 5 * 5+BM * BM = (12-BM) * (12-BM) to calculate BM and PM.
Simply prove that all three triangles in the diagram are similar triangles, and you can calculate D'N, PD' = AD = 12.
Knowing the three sides of a right-angled trapezoid, it is not difficult to find the other side, is it?