The error message will appear every 35 minutes.
35 is the lowest common multiple of 5 and 7 - i.e. the first time that something happening every 5 minutes and something happening every 7 minutes will happen at the same time will be after 35 minutes.
Checks mail - 5, 10, 15, 20, 25, 30, 35
Checks news - 7, 14, 21, 28, 35
Then every 35 minutes after that.
The once after one hour, three times after two bit is irrelevant, though true (first three errors will be at 35 mins, 70 mins, 105 mins).
24 hours = 1440 minutes
1440/35 = 41 (and 5 remainder)
So 41 error messages.
The once after one hour etc. information is not entirely irrelevant. It fixes the start point. Without this info there is no other information that confirms when the first error message occurred. This affects the remaining time into which the divide the common multiple. However, in this example, as far as I can recall,the multiple choice answer options do make the info. irrelevant.