This question was asked in Ex 7.2, 1
When we use distance formula ? 
Amanat Chauhan's image