The above answer is not correct! The correct way to solve this is to look at the ratio of the sides as these are similar triangles. We are told that AC = 4 and AE = 7. That means that the side AC has been multiplied by 7/4 in order to become the length AE. Because these are similar trianges, all the sides must be multiplied by the same amount - therefore the side AD is equal to the length of AB multiplied by 7/4. Because we are given the side AD and need to find AB, we simply run the process in reverse like so:
If AD = 7/4 x AB:
AB = 4/7 x AD
AB = 4/7 x 10
AB = 40/7 (5.71 as a decimal)
Hope I helped :))