Check the picture below.
[tex]\boxed{4a}\\\\ \triangle BCD \sim \triangle \textit{D} EF\qquad \textit{similarity by AA} \\\\\\ \boxed{4b}\\\\ \triangle ACE \sim \triangle ABF\qquad \textit{similarity by AA}[/tex]
notice on 4b, they both share the angle at A, and congruent angles at C and F.