Triangle AEX is a similar triangle with triangle ADC exterior angles on the same side of a transversal are equal and AD and AC are transversals cutting across the two parallel lines EF and DC. Angle EAX and Angle DAC are the same angle. Thus the two triangles are similar by Angle, Angle, Angle. Corresponding sides of similar triangles are proportional so:
length (EX) / 12 = 2 / 10
Solve for length EX by multiplying both sides of equation by 12
length EX = 2.4
XF = 12 - EX length = 12-2.4= 9.6