The article presents a method for solving the inverse problem of a two-dimensional anomalous diffusion equation with a Riemann–Liouville fractional-order derivative. In the first part of the present study, the authors present a numerical solution of the direct problem. For this purpose, a differential scheme was developed based on the alternating direction implicit method. The presented method was accompanied by examples illustrating its accuracy. The second part of the study concerned the inverse problem of recreating the model parameters, including the orders of the fractional derivative, in the anomalous diffusion equation. Equations of this type can be used to describe, inter alia, the heat conductivity in porous materials. The ant colony optimization algorithm was used to solve this problem. The authors investigated the impact of the distribution of measurement points, the use of different mesh sizes, and the input data errors on the obtained results.