We assume the total time to be ‘t’ units and f1 executes for ‘x’ units.
Since, f1(t) and f2(t) are executed sequentially.
So, f2 is executed for ‘t – x’ units.
We apply convolution on the sum of two independent random variables to get probability density function of the overall time taken to execute the program.
f1(x) * f2(t – x)