Questions & Answers about По дороге домой я забегу в аптеку.
Literally, it is something like along the road home or on the way home.
- по дороге = on the way / along the road
- домой = homeward / to home
As a whole, по дороге домой is a very natural Russian way to say on the way home.
Because the preposition по here requires the dative case.
- dictionary form: дорога = road, way
- dative singular: дороге
So:
- по дороге = along the road / on the way
This is a very common pattern in Russian:
- по пути = on the way
- по улице = along the street
- по дороге домой = on the way home
Because домой expresses motion toward home, while дома means at home.
Compare:
- Я иду домой. = I’m going home.
- Я дома. = I’m at home.
In your sentence, the person is still moving and the phrase means on the way home, so домой is the correct choice.