In rectangular ABCD, there is a point P, AP = 3, DP = 4, CP = 5, BP =? How to calculate?

In rectangular ABCD, there is a point P, AP = 3, DP = 4, CP = 5, BP =? How to calculate?

The parallel lines passing through P as AB intersect AB and CD at e and f respectively, and the parallel lines passing through P as CD intersect AD and BC at g and h respectively
Let Ag = BH = a, DG = ch = B, AE = DF = C, be = CF = D,
Then the square of AP = the square of a + the square of C, the square of CP = the square of B + the square of D, the square of DP = the square of B + the square of C, the square of BP = the square of a + the square of D
So the square of AP + the square of CP = the square of BP + the square of DP, so the square of BP = the square of AP + the square of CP - the square of DP = the square of 3 + the square of 4 - the square of 5, BP = 3 times root 2
(because I'm not skilled enough, I can only express it in words. Please forgive me.)