Let A be a random variable denoting the start time of process A, and let B be the start time of process B. Also, let and be the lengths of the processes, respectively, and let T be the day length. Then the processes overlap if . This area is shaded in the following picture.
So, you need to find out the ratio of the shaded shape to the total area .