when running a line, in a right-triangle, from the 90° angle perpendicular to its opposite side, we will end up with three similar triangles, one Small, one Medium and a containing Large one. Check the picture below.
so the longest leg of the larger triangle will be "z" and the shorter leg of it will be "y", so let's find those fellows using proportions