Given a triangle ABC with fixed point A(5,2) and also other points lie on lines y=x and y=0 respectively . How can I minimize the perimeter of the triangle ie \*\*

|AB+BC+CA|

\*\* should get minimum value ? I tried to assume the points as (p,p) and (q,0) but cannot reach anywhere with the distance formula.