You have neglected to say that ALL points mentioned are collinear.
Draw the picture; points (all of whose names ought to be single capital letters) occur in this order, from left to right:
X A Y Z B and the lengths are
2 2 4 6, I believe.
Check it out, carefully.