Предлагается решение задачи оптимального распределения ресурсов для двухсекторной модели экономики с целью максимизации благосостояния населения. Рассматривается модель, в которой экономика представлена двумя секторами: сектором производства средств производства и сектором производства потребительских благ. В качестве ресурсов используются капитал и труд. Задача решена на конечном, но достаточно большом интервале времени с применением принципа максимума Понтрягина. Приведена иллюстрация решения на примере производственной функции Кобба - Дугласа.