Optimal distribution of catalyst for a case involving heterogeneous and homogeneous reactions