The distance formula, , is the key element in the proof of which of the following?

A. CPCTC
B. The law of cosines
C. The law of sines
D. The triangle inequality theorem