In this paper a parametric optimization problem for a linear neutral system with two delays with an integral quadratic performance index is formulated and solved. The method of computing of a performance index value bases on determining of a Lyapunov functional defined on a state space such that its value for an initial state is equal to a performance index value. In the paper a form of a Lyapunov functional is assumed and a method of computing its coefficients is given. An example illustrating the application of discussed theory is presented. It concerns the system with a PD-controller designed to control a plant with two delays both retarded and neutral type. For such system a value of considered performance index is determined.