This is the problem of construction of the inscribed triangle DEF of least perimeter inside an accute angled triangle ABC. The solution is the orthic triangle DEF of ABC (in the second figure below).
The figure above (due to L. Fejer) suggests the solution. Assume a point D on BC fixed and consider all triangles DFE with variable E, F only. Reflect D on the sides to obtain points D', D'' forming the isosceles D'AD'' with angle(D'AD'') = 2*A and legs of length equal to |AD|. Obviously, among these triangle the one with least perimeter is DE'F', its perimeter being D'D''. Now vary also point D and seek the triangle DF'E' with least perimeter. Since the perimeter is |D'D''| = 2*|AD|*sin(A), this becomes minimal when AD coincides with the altitude from A. Then DE'F' takes the position of the orthic triangle and |D'D''| becomes equal to the perimeter of the orthic triangle.
See the file Fagnano.html for another proof relating also to the billiard-ball problem.
The figure below displays the right position for D giving the solution to the problem.