Consider the system as a right angled triangle where length of the ladder is the hypotenuse (H) and distance between the foot of the wall and the ladder is the base (B) and distance between the ground and the other end of the ladder is the Perpendicular (P)
Given: H = 13 m, B = 5 m
H2=P2+B2 (Pythagoras theorem)
132=P2+52
P2=144
P=12 m