Solution of the equations for nonlinear interaction of three damped waves