Solution of the optimal control problem for a nonlinear model of a three-sector economic cluster on a finite time interval