In this study, we propose a procedure for restoring the cooling conditions in a crystallizer and in the secondary cooling zone of a three-dimensional continuous casting process. The additional information required to solve the inverse problem is given by temperature measurements at selected points. The appropriate direct problem is solved using the alternating phase truncation method. The ant colony optimization algorithm and the artificial bee colony algorithm are used to minimize a functional that defines the error of the approximate solution. We compare usefulness of these two algorithms for solving this type of problem.