The first small question, I think you should be able to do it yourself, because there are already ∠A=∠D, and they are all right triangles, so it is similar.
The second question first uses Pythagorean theorem to find AB=5, AE= 1, AC=3, then EC=2, from BC/EC=AB/DE, then DE=2.5.