AB is the midsegment, so segment AB is half as long as segment XZ
Put another way, segment XZ is two times longer than segment AB, so,
XZ = 2*AB
34 = 2*(3x-1)
34 = 6x-2
6x-2 = 34
6x = 34+2
6x = 36
x = 36/6
x = 6
Answer: 6
Side Note: AB is 17 units long