Similar triangles are proportional, meaning one will be a factor larger or smaller than the other. This factor will be the same for all of the sides. So, we can say that one corresponding pair of sides is equal to another corresponding pair of sides.
BA / ED = AC / CD
42 / 6 = (64 - x) / (x)
6(64 - x) = 42(x)
384 - 6x = 42x
384 = 48x
x = 8
Hope this helps!