Count the boxes of each colour; each box is 30 minutes.
(i) Travelling: one box from 7:00 to 7:30 am and one box from 1:30 to 2:00 pm, so 2 boxes.
2×30=60 minutes=1 hour
(ii) Classes: 6 boxes (7:30 to 10:30 am) and 5 boxes (11:00 am to 1:30 pm), so 11 boxes. Studying and homework: 4 boxes (4:30 to 6:30 pm) and 1 box (9:00 to 9:30 pm), so 5 boxes.
Together: 11+5=16 boxes =16×30=480 minutes = 8 hours.
(iii) Sleeping: 12 boxes (midnight to 6:00 am) and 5 boxes (9:30 pm to midnight), so 12+5=17 boxes.
17×30=510 minutes=8 hours 30 minutes
The whole day has 48 boxes, so Ayaan sleeps 4817 of the day (a little more than one third, since 4816=31).