Imagine a triangle with a base $[0, s]$ and a height $h$. ($s, h \gt 0$)
For what orthocentre $x$ does the triangle have a minimal perimeter and how long is it?
Now, the proof starts with:
Assume $(x, h)$ is the third edge point of the triangle (next to $(0, 0$) and ($s, 0$)), then the perimeter is identical with
$$s + \sqrt{x^2 + h^2} + \sqrt{(x - s)^2 + h^2}.$$
How did he conclude that?

Like this?
The two diagonal sides of the triangle are given by Pythagoras' Theorem
Edit:
What if I add the orthocentre in like this? I assume $x$ is the $x$ coordinate of the orthocentre $C$?