Counting forward, there are 9 hours between 9:30 am and 6:30 pm.
Since you left at 6:05 pm, which is 25 minutes from 6:30 pm, subtract 25 minutes from 9 hours:
8 hours 35 minutes
You could also convert the time to 24-hour time (18:05 instead of 6:50 pm) and change it from hours and minutes to just hours:
9:30 am → 9 + 1/2
6:05 pm → 18 + 1/12
and subtract the two, then convert back into hours and minutes