The length of YZ is 38.
Since Y is between X and Z, we can use the following relationship:
XZ = XY + YZ
Substituting the given expressions, we get:
5a + 22 = (3a - 4) + (6a + 2)
Simplifying the equation, we get:
5a + 22 = 9a - 2
Combining like terms, we get:
4a = 24
Dividing both sides by 4, we get:
a = 6
Now, we can substitute the value of a into the expression for YZ:
YZ = 6a + 2
YZ = 6(6) + 2
YZ = 36 + 2
YZ = 38