ABCD: AB=4, AC=4√5, ∠ABC=∠BAD=90°, ∠ACD=90°.
cos ∠BAC=AB/AC=4/(4√5)=1/√5,
∠BAC=arccos(1/√5),
∠BAC+∠CAD=∠BAD=90°,
∠CAD=90°-∠BAC=90°-arccos(1/√5),
cos ∠CAD=AC/AD=4√5/AD,
cos(90°-arccos(1/√5))=4√5/AD,
AD=4√5/sin(arccos(1/√5))=4√5/sin(arcsin√(1-(1/√5)²))=4√5/√(1-⅕)=4√5/√⅘=4(√5)²/2=10,