3. (8 points) Liangliang set off from location A to location B at 8:00 AM, with a speed of 8 kilometers per hour. He rested for 1 hour in between, and arrived at location B at noon 12:00. Therefore, the distance between location A and location B is ( ) kilometers.
A. 16
B. 24
C. 32
D. 40