The paper deals with the problem of optimal control by minimizing functional of a terminal type I(u, v) = phi(1) (x(t(1))) + phi(2) (y(t(2))) (1) u(t) is an element of U subset of R-r, t is an element of T-1 = [t(0), t(1)], v(t) is an element of V subset of R-q, t is an element of T-2 = [t(1), t(2)], (2) x(t) = integral(t)(t0)f(t,s,x(s),u(s))ds, t is an element of T-1, (3) (y) over dot = g (t,y,v), t is an element of T-2 (4) y(t(1)) = G(x(t(1))). (5) Here f (t ,s,x,u), (g(t,y,v)) are give n (m)-dimensional vector-functions, respectively, continuous with respect to all the variables together with partial derivatives with respect to (x,u) ((y,v)) up to the second order inclusive, G(x) is m-dimensional twice continuously differentiable vector-function, t(0),t(1),t(2) are given and t(0) < t(1) < t(2), u(t) (v(t)) are r(q)-dimensional piecewise-continuous (with a finite number of points of discontinuity of the first kind) vector-functions of control actions, values from a given non- empty, bounded, and open sets U (V) , phi(1) (x) , phi(2)(y) are given twice continuously differentiable in R-n (R-m) scalar functions. Here phi(1)(x) and phi(2)(y) are given m-dimensional vector functions, respectively, continuous with respect to all the variables together with partial derivatives up to the second order inclusive.