To better understand you can think that we are finding 1 - Prob(Man catches the bus). Now certainly if he wants to catch the bus he will wait -> until bus arrives or 5 mins pass, whichever happens first.
So two cases exist either that the waiting time lies inside in the period 3:00 to 3:30 or partially outside this period.
example for case 1: man arrives at 3:10 so bus has 5 minutes from 3:10 to 3:15 to arrive. probability of catch = 5/30
example for case 2: man arrives at 3:28 so bus only has 2 minutes to arrive. probability of catch = 2/30
Note that probability of catch at 3:30 is 0 because the points are from 0 to 30 means when 30 started not completed. so basically from start of 0th min. to end of 29th min we have probability of catch.
Now let man's arrival time be X (or x).
So P(catch|X) = 
=
Therefore : 
AI was used in calculation part to keep it crisp (approach,theory,explanation and thought process are exclusively mine).