So, In Triangle BPC: BC2 = BP2 – CP2

Now, In Triangle ABC,

AB2 = AC2 + BC2 Þ AB2 = AC2 + BP2 – CP2

AB2 = AC2 – CP2 + BP2

AB2 = (AC - CP) (AC + CP) + BP2

AB2 = (AC - CP) (AP) + BP2

AB2 = (AC x AP - CP x AP) + BP2

AB2 = AC x AP + BP2 - CP x AP

But, AP x CP = BP x PD (D APB ~ D CPB)

AB2 = AC x AP + BP2 - BP x PD

AB2 = AC x AP + BP(BP – PD)

AB2 = AC x AP + BP x BD