Explanation:
this distance YZ is the height of the triangle WXY.
it splits the main triangle into 2 right-angled triangles WYZ and XYZ.
we can use Pythagoras
c² = a² + b²
with any of the 2 smaller right-angled triangles to get YZ.
remember, "c" is the Hypotenuse (the side opposite to the 90° angle). a and b are the legs.
so, when picking the larger one :
26² = 24² + YZ²
676 = 576 + YZ²
100 = YZ²
YZ = sqrt(100) = 10 = distance of Y to WX.