Final answer:
The man takes the elevator to the 7th floor and then walks the rest of the way to his apartment on the 10th floor because he hates walking and wants to minimize it.
Step-by-step explanation:
The man takes the elevator to the 7th floor and then walks the rest of the way to his apartment on the 10th floor. He does this because he hates walking and wants to minimize the amount of walking he has to do. So, if there are other people in the elevator or it's raining, he takes the elevator all the way to the 10th floor. But if there are no such conditions, he takes the elevator to the 7th floor and then takes the stairs because he prefers walking a shorter distance than taking the elevator all the way to the 10th floor.