When I said hello to Sasahara-san, I called him Kasahara-san instead of Sasahara-san.
ーI called Sasahara-san Kasahara-san by mistake.
「笹原さんを間違えて笠原さんと呼んだ」
to call A B by mistake で「Aを間違えてBと呼ぶ」
ーWhen I said hello to Sasahara-san, I called him Kasahara-san instead of Sasahara-san.
「笹原さんに挨拶した時に、彼を笹原さんと呼ぶ代わりに笠原さんと呼んでしまった」
to call him A instead of B で「彼をAと呼ぶ代わりにBと呼ぶ」
ご参考まで!