Okay, to come to my solution about it, I used variables instead of giving specific values.

I let HM = x, this means that AH = 2x (due to similar triangles and I know that 2AM = AB) and using Pythagoras, I get AM =

From this, we get AB =

and HB = 4x.

From there, I can get angles BAH and HAP which are respectively

and

respectively.

In degrees those give 63.43 and 26.57 degrees (I kept all the other numbers to retain the accuracy as much as possible).

And then I get angles ABP = 45, ACP = 45, APB = 180-(45+63.43) = 71.57, APC = 180-(45+26.57) = 108.43 degrees.

Since the sides don't matter now, I put AB = 2 cm and AH = 1 cm. And from those and using the angles I just found, using the sine rule, I get side BP = 2.12 cm and PC = 0.943 cm. The ratio then turns out to be 9:4