Take the problem on the left.

Triangles CBA and CED are similar since angle C is shared, angles CED and CBA are right, and angles EDC and BAC are equal.

So

The second problem is supposed to be done using the same principle, but the diagram seems to conflict with the problem? (CD is the whole base, but 10 seems to be only a part of it?)

-Dan