We propose an algorithm for the solution of the problem of heat conduction and hydrogen diffusion with variable coefficients of diffusion and solubility for structurally inhomogeneous materials. As an example, we test the algorithm by solving the problem for bimetallic cylindrical specimens used, according to the ASTM G146-01 standard, for the investigation of the hydrogen resistance of bimetallic joints. We determine the distribution of hydrogen concentration in cylindrical specimens with weld overlay obtained as a result of cooling at different rates after high-temperature hydrogenation. It is shown that, in the fusion zone (on the side of the coating), we observe the formation of the zones of superequilibrium supersaturation with hydrogen, which may result in the exfoliation of the weld overlay from the base metal.