The lengths of the segments intercepted on the transversals are proportional. Let's write a proportion using the expressions for the lengths of the segments.
17+5y/13+6y=3x-9/4x-22
Notice that XY=YZ, thus we can solve the equation 3x-9 = 4x-22 to find x.