Consider triangle ABC,suppose D is midpoint of AC and that the line through B perpendicular to AC intersects AC at a point X lying between D and C using Pythagoras theorem prove

$\displaystyle |BA|^{2}+|BC|^{2}=2|BD|^{2}+2|AD|^{2}$

i drew pretty nasty diagram couldn't work out where or wether to use SAS ASA or if any more criterion,axioms involved,thanks.