For right triangles, we can use the trigonometric functions like tangent which is the ratio of the opposite side and the adjacent side, with respect to the angle.
tan 30 = 10/AB AB = 10/tan30 AB = 17.32 cm
Segment PB: We apply the same thing for the other right triangle. tan45 = PB/8 PB = 8tan45 PB = 8 cm