Example 2 : AB is a line segment and line l is its perpendicular bisector. If a point P lies on l