In the figure, XYZ is a triangle with XY = 5cm, XZ = 2cm and…