かえりがけではありませんでした
kaerigakedewārimasendeshita

Noun
Desu Copula

The polite, past negative form of 帰りがけ

1. Was not on the way back.; Was not coming back.; It wasn't on my way back.

Past/Perfective
Negative
Polite
Formal Register