The times where he has more than a 5 minute wait are for the 5 minutes after train B arrives. That is 5 minutes out of every 15 (15 goes evenly into 60 minutes) or 5/15 = 1/3 of the time. The wait being less than 5 minutes will be 1 - 1/3 = 2/3 of the time.
Please consider a tutor. Take care.