In the paper the parametric optimization problem for a linear system with two delays and a PD-controller is presented. In the parametric optimization problem the quadratic performance index is considered. The value of the quadratic index of quality is calculated due to the Lyapunov functional and is equal to the value of that functional for the initial function of the neutral system with two delays. The Lyapunov functional is determined by means of the Lyapunov matrix.