Aditya started his home work at 5:50 PM and spent 25 minutes doing it.
5:50 PM means 5 hours 50 minutes and 25 minutes will be added to it.
So now the time is 6 hours 15 minutes. He took a break of 5 minutes, so now the time is 6 hours 20 minutes.
He finished his homework in next 40 minutes. So, 6 hours 20 minutes + 40 minutes = 7:00 PM