Since A is the midpoint, XA = AY
Since the midpoint of XA is at 3x all of XA would be two times that so 6x
Since the midpoint of AY is 5x-6 all of AY would be 10x-12
XA is then 6x and Ay is 10x-12 sinc XA = AY we can say
6x = 10x-12 subtract 10x from both sides
-4x = -12 divide -4 from both sides
x = 3
so A. XA = 2 * 3x
B. AY = 2(5x-6), XY = XA + AY
This is about the only example I can show you since you have no numbers.