From the drawing, we can see that:
XA = 3x and AY = 5x - 6
Since A is the midpoint of AY, therefore, XA = AY
3x = 5x - 6
6 = 5x - 3x
6 = 2x
x = 3
Substituting in the equations of XA and AY, we can calculate their lengths as follows:
XA = 3x = 3 x 3 = 9 length units
AY = 5x - 6 = 5(3) - 6 = 15 - 6 = 9 lengths units as well
To get the length of XY, simply add the length of XA and AY as follows:
XY = 9 + 9 = 18 length units.