This work further develops a recently proposed time-resolved inline digital holography (TRIDH) [Petrov, N. V. et al. Opt. Lett. 43, 3481 (2018)] for studying degenerate phase modulation induced by an inclined collimated pump beam in the glass substrate with the quantum dots at the surface. Similar to many techniques for measuring nonlinear properties of materials, it is based on a comparison of the prediction obtained by the mathematical model of the phenomenon with experimental data. We have extended the mathematical model for the case of interaction of two femtosecond laser pulses in the double-layered sample. The impact of the ratio between nonlinear refractive indexes of two layers and their thicknesses on induced phase modulation is analyzed.