The hour hand moves through 5 minute divisions every hour, so every 60/5=12 minutes moved by the minute hand moves the hour hand one minute division.
At 7:05, the hour hand hasn't even moved one whole minute division past the 7 o'clock mark, so it's closer to 7 than to 8.
At 3:10, the hour hand still hasn't quite reached to one minute division after the 3 so it's closer to 3 than to 4. (At 3:12, the hour hand will be on the first minute division after 3.)
At 7:55, the hour hand has passed the 4th minute division (after 7:48) so it's closer to 8 than to 7.
(When it's 30 minutes past the hour, the hour hand is midway between two consecutive hours, so it's the same distance away from each of the two hours.)