Use a formula to represent the distance between those two points and this point (the formula has a radical sign, which is so complicated), and use a b to represent the distance between those two paragraphs.
The sum of distances is represented by y.
Then Y=a+b
This is a relationship between y and X.
We can discuss why y is the smallest when x is a value.
I don't know if you have learned this.